Debian Codegraph @

.github/workflows/docs.yml

raw
1 name: Docs
2
3 on:
4 push:
5 pull_request:
6 branches: [ "main" ]
7
8 # Allows you to run this workflow manually from the Actions tab
9 workflow_dispatch:
10
11 permissions:
12 contents: read
13
14 jobs:
15 docs:
16 runs-on: ubuntu-latest
17
18 steps:
19 - uses: actions/checkout@v4
20
21 - name: Set up Python
22 uses: actions/setup-python@v5
23 with:
24 python-version: "3.x"
25
26 - name: Install docs dependencies
27 shell: bash
28 run: |
29 python -m pip install --upgrade pip
30 python -m pip install sphinx sphinxcontrib-spelling
31 python -m pip install .[test]
32 if [ -f requirements-docs.txt ]; then pip install -r requirements-docs.txt; fi
33 if [ -f docs/requirements-docs.txt ]; then pip install -r docs/requirements-docs.txt; fi
34
35 - name: Build docs
36 run: |
37 mkdir -p _static
38 python3 -m sphinx -W -b html . _build/html
39 working-directory: docs
40 env:
41 PYTHONPATH: ..
42
43 - name: Check links
44 run: |
45 mkdir -p _static
46 python3 -m sphinx -W -b linkcheck . _build/linkcheck
47 working-directory: docs
48 env:
49 PYTHONPATH: ..
50
51 - name: Doctest
52 run: |
53 mkdir -p _static
54 python3 -m sphinx -W -b doctest . _build/doctest
55 working-directory: docs
56 env:
57 PYTHONPATH: ..
58
59 - name: Spellcheck
60 run: |
61 mkdir -p _static
62 python3 -m sphinx -W -b spelling . _build/spelling
63 working-directory: docs
64 env:
65 PYTHONPATH: ..