Skip to content

Commit 38ab5a0

Browse files
authored
Merge pull request #338 from mik-laj/docs
Build documentation on CI
2 parents 6975f80 + f8d8228 commit 38ab5a0

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

.github/workflows/build-docs.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build documentation
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python 3.9
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.9
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -r requirements.txt
21+
pip install -r requirements_dev.txt
22+
pip install -e .
23+
- name: Build documentation
24+
run: |
25+
python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs docs/_build/html -n -W
26+
- uses: actions/upload-artifact@v2
27+
name: Upload docs as artifact
28+
with:
29+
name: docs-html
30+
path: './docs/_build/html'
31+
if-no-files-found: error

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@
5858
# Add any paths that contain custom static files (such as style sheets) here,
5959
# relative to this directory. They are copied after the builtin static files,
6060
# so a file named "default.css" will overwrite the builtin "default.css".
61-
html_static_path = ['_static']
61+
html_static_path = []

requirements_dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ requests==2.22.0
99
responses==0.10.12
1010
webob
1111
strict-rfc3339==0.7
12+
sphinx==4.0.2
13+
sphinx-rtd-theme==0.5.2

0 commit comments

Comments
 (0)