Skip to content

Commit 591021a

Browse files
committed
feat: add build docs gh action
1 parent 7e48dcf commit 591021a

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/build-docs.yaml

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

0 commit comments

Comments
 (0)