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 16, 2024
1 parent 9d9d3b5 commit 5ed27fe
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,31 @@ jobs:
- name: Publish coverage report
uses: codecov/codecov-action@v3

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

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'requirements/*.txt'
- name: Install dependencies
run: pip install -r requirements/ci.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: openklant.conf.ci

docker:
needs: tests
name: Build Docker image
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/config.rst --exclude-group Celery

0 comments on commit 5ed27fe

Please sign in to comment.