Skip to content

Commit 5786b4d

Browse files
committed
Set up sphinx to auto-build on push
1 parent af5e437 commit 5786b4d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/sphinx.yml

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

0 commit comments

Comments
 (0)