Skip to content

Commit

Permalink
Create action to validate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jairhenrique committed Jul 23, 2023
1 parent 6d7398f commit 2926dca
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Validate docs

on:
push:
paths:
- 'docs/**'

jobs:
validate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install build dependencies
run: pip install -r docs/requirements.txt
- name: Rendering HTML documentation
run: sphinx-build -T -E -b html -d _build/doctrees -D language=en docs/ html
- name: Inspect html rendered
run: cat html/index.html
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following HTTP libraries are supported:
- ``boto3``
- ``http.client``
- ``httplib2``
- ``requests`` (both 1.x and 2.x versions)
- ``requests`` (2.x versions)
- ``tornado.httpclient``
- ``urllib2``
- ``urllib3``
Expand Down
21 changes: 0 additions & 21 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,6 @@ deps =
ruff
basepython = python3.10

[testenv:docs]
# Running sphinx from inside the "docs" directory
# ensures it will not pick up any stray files that might
# get into a virtual environment under the top-level directory
# or other artifacts under build/
changedir = docs
# The only dependency is sphinx
# If we were using extensions packaged separately,
# we would specify them here.
# A better practice is to specify a specific version of sphinx.
deps =
sphinx
sphinx_rtd_theme
# This is the sphinx command to generate HTML.
# In other circumstances, we might want to generate a PDF or an ebook
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
# We use Python 3.8. Tox sometimes tries to autodetect it based on the name of
# the testenv, but "docs" does not give useful clues so we have to be explicit.
basepython = python3.8

[testenv]
# Need to use develop install so that paths
# for aggregate code coverage combine
Expand Down

0 comments on commit 2926dca

Please sign in to comment.