Skip to content

Commit bc6ad52

Browse files
Add CI check that generated documentation is up to date
The Sphinx extensions in doc/exts/ regenerate tracked .rst files on every build, but a clean Sphinx build was not enough to flag drift in the committed copies. Run 'git diff --exit-code' after 'tox -e docs' so PRs that change checker messages or options must include the regenerated docs.
1 parent b080a21 commit bc6ad52

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/checks.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,9 @@ jobs:
158158
echo "Make sure that 'tox -e docs' succeed without any modifications locally." ; \
159159
exit 1; \
160160
}
161+
- name: Check that generated documentation is up to date
162+
run: |
163+
if ! git diff --exit-code; then
164+
echo "::error::Generated documentation is out of date. Run 'tox -e docs' locally and commit the changes."
165+
exit 1
166+
fi

0 commit comments

Comments
 (0)