-
Notifications
You must be signed in to change notification settings - Fork 65
51 lines (42 loc) · 1.5 KB
/
build_documentation.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
name: Build HTML documentation
on:
[push, pull_request]
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.11'
- name: Install Pandoc
run: |
sudo apt update
sudo apt install -y pandoc
- name: Install documentation dependencies
run: |
python -mpip install -r doc/requirements.txt
- name: Install qutip-qip from GitHub
run: |
python -mpip install -e .
# Install in editable mode so it doesn't matter if we import from
# inside the installation directory, otherwise we can get some errors
# because we're importing from the wrong location.
python -c 'import qutip_qip; print("QuTiP QIP Version: %s" % qutip_qip.__version__)'
python -c 'import qutip; qutip.about()'
- name: Build documentation
working-directory: doc
run: |
make html SPHINXOPTS="-W --keep-going -T"
# Above flags are:
# -W : turn warnings into errors
# --keep-going : do not stop after the first error
# -T : display a full traceback if a Python exception occurs
- name: Upload built files
uses: actions/upload-artifact@v4
with:
name: qutip_qip_html_docs
path: doc/_build/html/*
if-no-files-found: error