Skip to content

Commit

Permalink
👷 [open-zaak/open-zaak#1649] Job to check if docs changed
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbal committed Aug 22, 2024
1 parent c332881 commit cf78d5d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Publish coverage report
uses: codecov/codecov-action@v3

docs:
check-envvar-docs:
runs-on: ubuntu-latest
name: Documentation build

Expand All @@ -75,6 +75,17 @@ jobs:
python-version: '3.11'
- name: Install dependencies
run: pip install -r requirements/dev.txt pytest
- name: Generate environment variable documentation using OAf and check if it was updated
run: |
bin/generate_envvar_docs.sh
changes=$(git diff docs/installation/config.rst)
if [ ! -z "$changes" ]; then
echo $changes
echo "Please update the environment documentation by running \`bin/generate_envvar_docs.sh\`"
exit 1
fi
env:
DJANGO_SETTINGS_MODULE: nrc.conf.ci
- name: Build and test docs
run: cd docs && pytest check_sphinx.py -v --tb=auto

Expand Down
4 changes: 4 additions & 0 deletions bin/generate_envvar_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Generates the documentation for environment variables
src/manage.py generate_envvar_docs --file docs/installation/configuration/env_config.rst

0 comments on commit cf78d5d

Please sign in to comment.