-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (56 loc) · 1.54 KB
/
docs.yml
File metadata and controls
71 lines (56 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build and Deploy Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
VIRTUAL_ENV: ".venv"
UV_ACTIVE: 1
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
run: uv python install
- name: Create virtual environment
run: uv venv .venv
- name: Activate virtual environment
run: |
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=${{ github.workspace }}/.venv" >> $GITHUB_ENV
- name: Install the project
run: |
uv sync --dev
- name: Build documentation
run: sphinx-build -b html docs/source docs/build/
- name: Commit and Stash Documentation
run: |
git add -f docs/build/
git stash
- name: Checkout gh-pages
uses: actions/checkout@v6
with:
ref: gh-pages
- name: Configure Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Cleanup Old Folders
run: |
rm -rf _static/
rm -rf _modules/
rm -rf _sources/
rm -rf examples/
rm -rf modules/
- name: Deploy to gh-pages
run: |
git stash pop
mv -f docs/build/* .
rm -rf docs/build
git add .
git commit -m "Auto update docs"
git push