Skip to content

Commit 6e57a7a

Browse files
committed
Add Sphinx docs GitHub Pages workflow
1 parent e7dd983 commit 6e57a7a

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and Deploy Sphinx docs
2+
3+
on:
4+
push:
5+
branches: [ main ] # or your default branch
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install sphinx
25+
# add any extensions you use, e.g.:
26+
# pip install myst-parser sphinx_rtd_theme
27+
28+
- name: Build docs
29+
working-directory: ./docs
30+
run: |
31+
sphinx-build -b html source _build/html
32+
33+
- name: Deploy to GitHub Pages
34+
uses: peaceiris/actions-gh-pages@v4
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./docs/_build/html

0 commit comments

Comments
 (0)