Skip to content

Commit ffa92de

Browse files
committed
Create gh-pages.yml
1 parent 5e34e64 commit ffa92de

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy Sphinx Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.x'
24+
25+
- name: Install dependencies
26+
run: |
27+
pip install Sphinx sphinx_rtd_theme
28+
29+
- name: Build HTML
30+
run: sphinx-build -b html source build/html
31+
32+
- name: Deploy to gh-pages
33+
uses: peaceiris/actions-gh-pages@v4
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_branch: gh-pages
37+
publish_dir: build/html

0 commit comments

Comments
 (0)