| 1 |
name: Documentation building |
| 2 |
on: |
| 3 |
schedule: |
| 4 |
- cron: '0 0 * * 2' |
| 5 |
push: |
| 6 |
branches: |
| 7 |
- main |
| 8 |
pull_request: |
| 9 |
branches: |
| 10 |
- main |
| 11 |
paths: |
| 12 |
- .github/workflows/docs.yml |
| 13 |
- "kiwi/**" |
| 14 |
- "py/**" |
| 15 |
- "docs/**" |
| 16 |
- setup.py |
| 17 |
- pyproject.toml |
| 18 |
|
| 19 |
jobs: |
| 20 |
docs: |
| 21 |
name: Docs building |
| 22 |
runs-on: ubuntu-latest |
| 23 |
steps: |
| 24 |
- uses: actions/checkout@v7 |
| 25 |
- name: Get history and tags for SCM versioning to work |
| 26 |
run: | |
| 27 |
git fetch --prune --unshallow |
| 28 |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* |
| 29 |
- name: Set up Python |
| 30 |
uses: actions/setup-python@v7 |
| 31 |
with: |
| 32 |
python-version: '3.x' |
| 33 |
- name: Install dependencies |
| 34 |
run: | |
| 35 |
python -m pip install --upgrade pip |
| 36 |
pip install -r docs/requirements.txt |
| 37 |
- name: Install project |
| 38 |
run: | |
| 39 |
pip install . |
| 40 |
- name: Install graphviz |
| 41 |
uses: ts-graphviz/setup-graphviz@v2 |
| 42 |
- name: Build documentation |
| 43 |
run: | |
| 44 |
mkdir docs_output; |
| 45 |
sphinx-build docs/source docs_output -W -b html; |