Repository navigation
68 lines (58 loc) · 1.99 KB
/
Copy pathdocs.yml
File metadata and controls
68 lines (58 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Documentation
on:
push:
branches: ['**'] # Build on all branches
pull_request:
branches: ['**']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- uses: actions/cache@v6
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-docs-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-docs-
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
# Install pytables separately if needed by the package
pip install --verbose tables
pip install -e ".[docs]"
- name: Lint documentation with doc8
run: doc8 README.rst docs CITATION.rst --max-line-length=100
# Advisory: external sites fail transiently. linkcheck is a builtin
# Sphinx builder; the source directory is the one holding conf.py.
- name: Check documentation links
run: sphinx-build -b linkcheck docs/source docs/build/linkcheck
continue-on-error: true
- name: Build documentation
env:
SPHINXOPTS: -W --keep-going -n # Warnings as errors, but show all
working-directory: docs
run: |
make clean
make html
# Advisory report of undocumented objects (sphinx.ext.coverage builder).
- name: Check documentation coverage
run: |
sphinx-build -b coverage docs/source docs/build/coverage
cat docs/build/coverage/python.txt
continue-on-error: true
- name: Upload documentation artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: documentation-${{ github.run_id }}
path: |
docs/build/html/
docs/build/doctrees/
docs/build/coverage/
docs/build/linkcheck/
retention-days: 90