File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change
1
+ # A work-flow for generating documentation given a PR
2
+ # Builds Sphinx documentation, uploads the generated HTML files as artefacts and deploys them to GitHub Pages
1
3
name : Build docs
2
4
5
+ # It runs on every push, but it only generates the documentation from master (which makes sense)
3
6
on : push
4
7
5
8
jobs :
6
9
sphinx-build :
10
+ # Target platform; mostly doesn't matter for HTML websites generated from Sphinx
7
11
runs-on : ubuntu-latest
12
+
8
13
steps :
9
14
- uses : actions/checkout@v2
15
+
16
+ # 1) Build HTML from Sphinx
10
17
- name : Build HTML
18
+ uses : ammaraskar/sphinx-action@0.4
11
19
with :
12
20
pre-build-command : " apt install -y pandoc"
13
- uses : ammaraskar/sphinx-action@0.4
21
+
22
+ # 2) Upload the generated HTML
14
23
- name : Upload artifacts
15
- uses : actions/upload-artifact@v1
24
+ uses : actions/upload-artifact@v3
16
25
with :
17
26
name : html-docs
18
27
path : docs/build/html/
28
+
29
+ # 3) Deploy using GitHub pages, but only if the branch == master
19
30
- name : Deploy
20
31
uses : peaceiris/actions-gh-pages@v3
21
32
if : github.ref == 'refs/heads/master'
22
33
with :
23
34
github_token : ${{ secrets.GITHUB_TOKEN }}
24
- publish_dir : docs/build/html
35
+ publish_dir : docs/build/html
You can’t perform that action at this time.
0 commit comments