Skip to content

Commit 89a106f

Browse files
committed
add action
1 parent ea63e6f commit 89a106f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/docs.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish Sphinx Documentation
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish_sphinx_docs:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v5
18+
with:
19+
version: "0.5.1"
20+
enable-cache: true
21+
cache-dependency-glob: "uv.lock"
22+
- name: Install dependencies
23+
run: |
24+
uv sync --python 3.10
25+
- name: Sphinx build
26+
run: |
27+
sphinx-multiversion source build
28+
- name: Create index.html
29+
run: |
30+
cp source/_templates/gh-pages-redirect.html build/index.html
31+
- name: Deploy
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
publish_branch: gh-pages
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: build/
37+
force_orphan: true
38+

0 commit comments

Comments
 (0)