Skip to content

Commit 61e2d04

Browse files
committed
Fix documentation work-flow
1 parent 752fab3 commit 61e2d04

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/build_docs.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
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
13
name: Build docs
24

5+
# It runs on every push, but it only generates the documentation from master (which makes sense)
36
on: push
47

58
jobs:
69
sphinx-build:
10+
# Target platform; mostly doesn't matter for HTML websites generated from Sphinx
711
runs-on: ubuntu-latest
12+
813
steps:
914
- uses: actions/checkout@v2
15+
16+
# 1) Build HTML from Sphinx
1017
- name: Build HTML
18+
uses: ammaraskar/sphinx-action@0.4
1119
with:
1220
pre-build-command: "apt install -y pandoc"
13-
uses: ammaraskar/sphinx-action@0.4
21+
22+
# 2) Upload the generated HTML
1423
- name: Upload artifacts
15-
uses: actions/upload-artifact@v1
24+
uses: actions/upload-artifact@v3
1625
with:
1726
name: html-docs
1827
path: docs/build/html/
28+
29+
# 3) Deploy using GitHub pages, but only if the branch == master
1930
- name: Deploy
2031
uses: peaceiris/actions-gh-pages@v3
2132
if: github.ref == 'refs/heads/master'
2233
with:
2334
github_token: ${{ secrets.GITHUB_TOKEN }}
24-
publish_dir: docs/build/html
35+
publish_dir: docs/build/html

0 commit comments

Comments
 (0)