Skip to content

Commit c24e504

Browse files
committed
add workflow for generating Sphinx docs
1 parent 563747a commit c24e504

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/sphinx.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# https://www.sphinx-doc.org/en/master/tutorial/deploying.html
2+
# https://github.com/actions/deploy-pages
3+
# https://github.com/actions/upload-pages-artifact
4+
name: 'Sphinx: Render docs'
5+
6+
on:
7+
push:
8+
branches:
9+
- 'main'
10+
paths:
11+
- 'docs/**'
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out Git repository
18+
uses: actions/checkout@v4
19+
- name: Setup Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.13'
23+
cache: 'pip'
24+
cache-dependency-path: docs/requirements.txt
25+
- name: Install setup dependencies
26+
run: python -m pip install --upgrade pip setuptools wheel
27+
- name: Install docs dependencies
28+
run: python -m pip install -r docs/requirements.txt
29+
- name: Make HTML
30+
run: cd docs && make html
31+
- name: Upload artifacts
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
name: github-pages
35+
path: docs/_build/html/
36+
deploy:
37+
needs: build
38+
permissions:
39+
pages: write
40+
id-token: write
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)