Skip to content

Commit

Permalink
Test docs build using CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Aug 20, 2023
1 parent 627984f commit 6c2e6cc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,28 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: coverage/merged.xml,coverage/js/clover.xml

docs-test:
name: Docs
runs-on: ubuntu-latest
container:
image: ghcr.io/mvorisek/image-php:latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Python and dependencies
run: |
apk add python3 py3-pip
python --version
(cd docs && pip install -r requirements.txt)
- name: Build
run: |
mv docs/baseline.txt docs/baseline.orig.txt
(cd docs && python -m sphinx -T -b html . out 2>&1 | tee baseline.txt)
sed -i -r 's~[^:]*/docs/([^:]*:)([0-9]+:)?~\1~;t;d' docs/baseline.txt
- name: Diff build baseline
run: |
diff -u docs/baseline.orig.txt docs/baseline.txt
1 change: 1 addition & 0 deletions docs/baseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testui
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sphinx<5
sphinx-rtd-theme
sphinxcontrib-phpdomain
sphinxcontrib-phpdomain @ git+https://github.com/markstory/sphinxcontrib-phpdomain@f785b8b333
myst-parser
linkify-it-py

0 comments on commit 6c2e6cc

Please sign in to comment.