-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (48 loc) · 1.27 KB
/
main.yml
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
name: Build docs and check links
on: [push, pull_request]
env:
PYTHONWARNINGS: error
PIP: python -m pip
SPHINX: python -m sphinx -W --keep-going --color
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3"
- name: Double-check Python version
run: |
python --version
- name: Install Python package
env:
PYTHONWARNINGS: error,default::DeprecationWarning
run: |
$PIP install .
- name: Install docs dependencies
run: |
$PIP install -r doc/requirements.txt
- name: Build HTML
run: |
$SPHINX -d _build/doctrees/ doc/ _build/html/ -b html
- name: Upload error log
uses: actions/upload-artifact@v3
if: failure()
with:
name: build-log
path: /tmp/sphinx-err-*.log
- name: Check links
run: |
$SPHINX -d _build/doctrees/ doc/ _build/linkcheck/ -b linkcheck
- name: Upload linkcheck results
uses: actions/upload-artifact@v3
if: ${{ success() || failure() }}
with:
name: linkcheck
path: _build/linkcheck/output.*