-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 1.48 KB
/
docs.yml
File metadata and controls
72 lines (61 loc) · 1.48 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
72
name: Build documentation
on:
push:
branches:
- main
paths:
- docs/**
- src/**
- .github/workflows/docs.yml
pull_request:
branches:
- main
- develop
paths:
- docs/**
- src/**
- .github/workflows/docs.yml
permissions:
contents: read
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Create virtual environment
run: |
uv venv
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV
- uses: Swatinem/rust-cache@v2
- name: Build wheel
run: uv build && uv sync --reinstall
- name: Build Python documentation
working-directory: docs
run: make clean html
- name: Deploy
uses: actions/upload-pages-artifact@v4
with:
path: docs/_build/html
deploy:
if: github.event_name == 'push'
needs: build-docs
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4