-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (52 loc) · 1.6 KB
/
Copy pathdocs_pages.yaml
File metadata and controls
60 lines (52 loc) · 1.6 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
name: Docs2Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: docs-build-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install Python 3.13
run: uv python install 3.13
- name: Install dependencies
run: uv sync --all-extras
- name: Build Sphinx + Furo site
# `-W` promotes warnings to errors so docstring/signature drift fails CI.
run: uv run sphinx-build -W --keep-going -b html docs/source docs/build/sphinx
- name: Upload Pages artifact
# Run on push-to-main and on manual workflow_dispatch of the main ref.
# (push is already restricted to main by `on.push.branches`.)
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/build/sphinx
deploy:
needs: build
# Deploy on push-to-main and on manual workflow_dispatch of the main ref.
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Per GitHub Pages guidance: don't cancel an in-flight deploy.
concurrency:
group: pages
cancel-in-progress: false
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4