-
Notifications
You must be signed in to change notification settings - Fork 157
85 lines (72 loc) · 2.32 KB
/
docs.yml
File metadata and controls
85 lines (72 loc) · 2.32 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Docs
on:
push:
branches:
- master
pull_request:
types: [opened, edited, reopened, synchronize, ready_for_review]
permissions:
contents: read
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
steps:
# 6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
# 6.2.0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: |
python3 -m pip install -U pip
pip install -U -r requirements.txt
- name: Sphinx build
run: |
echo "::add-matcher::.github/matchers/sphinx.json"
make -C docs/ html SPHINXOPTS="${SPHINXOPTS}"
echo "::remove-matcher owner=sphinx::"
env:
SPHINXOPTS: -n -W -a --keep-going
- name: Upload docs as artifacts
uses: actions/upload-artifact@v4
with:
name: Documentation
path: docs/_build/**/html
linkcheck:
name: Linkcheck
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
# 6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
# 6.2.0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: |
python3 -m pip install -U pip
pip install -U -r requirements.txt
- name: Sphinx linkcheck
run: |
make -C docs/ linkcheck SPHINXOPTS="${SPHINXOPTS}"
env:
SPHINXOPTS: -n -W -a --keep-going
- name: Sphinx linkcheck collect
if: always()
run: |
echo "::add-matcher::.github/matchers/sphinx-linkcheck.json"
echo "::add-matcher::.github/matchers/sphinx-linkcheck-warn.json"
sed 's@^@docs/@' docs/_build/linkcheck/output.txt
echo "::remove-matcher owner=sphinx::"
echo "::remove-matcher owner=sphinx-warn::"
# 7.0.0
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
if: always()
with:
name: Linkcheck report
path: docs/_build/**/linkcheck/output.txt