Skip to content

Commit

Permalink
Check docs in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Apr 17, 2024
1 parent e021359 commit e8d8e54
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 4 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,28 @@ jobs:
pip-sync requirements/requirements.txt requirements/requirements-test.txt
- name: Test with tox
run: tox

docs:
name: Build and check documentation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install pip-tools
pip-sync requirements/requirements.txt requirements/requirements-docs.txt
- name: Lint docs with sphinx-lint
run: |
sphinx-lint docs
- name: Build docs and check the integrity of external links
run: |
pwd
sphinx-build --builder linkcheck --fail-on-warning "source" "build"
sphinx-build --builder html --fail-on-warning "source" "build"
working-directory:
./docs
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"python": ("https://docs.python.org/3", None),
}

linkcheck_retries = 3

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage/creating_operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ operator.
.. [#f1] You could implement some checks on the type of the provided argument,
if it happens to be a :data:`~jsonlogic.typing.JSONLogicPrimitive` where the
``>`` argument doesn't make sense (arrays for instance). However, this is a
task better suited for typechecking.
task better suited for typechecking.
3 changes: 2 additions & 1 deletion requirements/requirements-docs.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-c requirements.txt
furo
sphinx
sphinx-paramlinks
sphinx-lint
sphinx-paramlinks
10 changes: 8 additions & 2 deletions requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
docutils==0.20.1
docutils==0.21.1
# via
# sphinx
# sphinx-paramlinks
Expand All @@ -30,24 +30,30 @@ markupsafe==2.1.5
# via jinja2
packaging==24.0
# via sphinx
polib==1.2.0
# via sphinx-lint
pygments==2.17.2
# via
# furo
# sphinx
regex==2024.4.16
# via sphinx-lint
requests==2.31.0
# via sphinx
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.5
# via beautifulsoup4
sphinx==7.2.6
sphinx==7.3.5
# via
# -r requirements/requirements-docs.in
# furo
# sphinx-basic-ng
# sphinx-paramlinks
sphinx-basic-ng==1.0.0b2
# via furo
sphinx-lint==0.9.1
# via -r requirements/requirements-docs.in
sphinx-paramlinks==0.6.0
# via -r requirements/requirements-docs.in
sphinxcontrib-applehelp==1.0.8
Expand Down

0 comments on commit e8d8e54

Please sign in to comment.