From 50a57a1192aecee633751a8e9867fa377a9c90aa Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Tue, 23 Jul 2024 12:07:00 +0200 Subject: [PATCH] :construction_worker: [open-zaak/open-zaak#1649] Job to check if docs changed --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdc0b9bb..e82cc259 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,37 @@ jobs: - name: Publish coverage report uses: codecov/codecov-action@v3 + 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 system packages + run: | + sudo apt-get update \ + && sudo apt-get install -y --no-install-recommends \ + libgdal-dev \ + gdal-bin + - 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: | + python src/manage.py generate_envvar_docs --file docs/installation/config.rst + changes=$(git diff docs/installation/config.rst) + if [ ! -z "$changes" ]; then + echo $changes + echo "Please update the environment documentation by running \`python src/manage.py generate_envvar_docs --file docs/installation/config.rst\`" + exit 1 + fi + env: + DJANGO_SETTINGS_MODULE: objects.conf.ci + docker: needs: tests