-
Notifications
You must be signed in to change notification settings - Fork 11
58 lines (58 loc) · 1.67 KB
/
docs.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
49
50
51
52
53
54
55
56
57
58
name: Build Docs with Sphinx
on: [push, pull_request]
env:
PIP_INSTALL: python -m pip install
SPHINX: python -m sphinx -W --keep-going --color
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pandoc
run: |
sudo apt-get install --no-install-recommends pandoc
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3"
- name: Show Python version
run: |
python --version
- name: Install Python package
run: |
$PIP_INSTALL .
- name: Install docs dependencies
run: |
$PIP_INSTALL -r doc/requirements.txt
- name: Build HTML
run: |
$SPHINX doc/ _build/html/ -d _build/doctrees/ -b html
- name: Upload HTML
uses: actions/upload-artifact@v4
with:
name: HTML
path: _build/html/
- name: Build LaTeX sources
run: |
$SPHINX doc/ _build/latex/ -d _build/doctrees/ -b latex
- name: Run LaTeX
uses: dante-ev/latex-action@master
with:
working_directory: _build/latex
root_file: splines.tex
- name: Upload PDF
uses: actions/upload-artifact@v4
with:
name: PDF
path: _build/latex/splines.pdf
- name: Check links
run: |
$SPHINX doc/ _build/linkcheck/ -d _build/doctrees/ -b linkcheck
- name: Upload linkcheck results
uses: actions/upload-artifact@v4
if: ${{ success() || failure() }}
with:
name: linkcheck
path: _build/linkcheck/output.*