Skip to content

Commit b06fb08

Browse files
Add Sphinx documentation workflow
1 parent 3c96dda commit b06fb08

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Sphinx documentation
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
docs:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-python@v3
19+
- name: Install dependencies
20+
run: |
21+
pip install sphinx sphinx_rtd_theme myst_parser
22+
- name: Sphinx build
23+
run: |
24+
sphinx-build docs _build
25+
- name: Deploy to GitHub Pages
26+
uses: peaceiris/actions-gh-pages@v3
27+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
28+
with:
29+
publish_branch: gh-pages
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: _build/
32+
force_orphan: true

0 commit comments

Comments
 (0)