Skip to content

Commit

Permalink
Add .github/workflows/doc_checks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Sep 15, 2024
1 parent 01e1492 commit 364a6a3
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/doc_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Docs

on:
push:
branches-ignore:
- 'backport**'
- 'dependabot**'
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
docs:
name: Documentation checks

runs-on: ubuntu-latest
strategy:
fail-fast: true
container: ghcr.io/osgeo/proj-docs

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Print versions
shell: bash -l {0}
run: |
python3 --version
sphinx-build --version
python3 -m pip list --not-required --format=columns
- name: Lint .rst files
shell: bash -l {0}
run: |
set -eu
if find . -name '*.rst' | xargs grep -P '\t'; then echo 'Tabs are bad, please use four spaces in .rst files.'; false; fi
if find . -name '*.rst' | xargs grep "\.\.versionadded"; then echo 'Wrong annotation. Should be .. versionadded'; false; fi
if find . -name '*.rst' | xargs grep "\.\.note"; then echo 'Wrong annotation. Should be .. note'; false; fi
if find . -name '*.rst' | xargs grep "\.\.warning"; then echo 'Wrong annotation. Should be .. warning'; false; fi
if find . -name '*.rst' | xargs grep "\.\.codeblock"; then echo 'Wrong annotation. Should be .. codeblock'; false; fi
working-directory: ./docs
- name: Doxygen
shell: bash -l {0}
run: |
make .doxygen_up_to_date
working-directory: ./docs
- name: Spelling
shell: bash -l {0}
run: |
make spelling SPHINXOPTS=-W
working-directory: ./docs

0 comments on commit 364a6a3

Please sign in to comment.