Repository navigation
53 lines (49 loc) · 1.67 KB
/
Copy pathdocs.yml
File metadata and controls
53 lines (49 loc) · 1.67 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
name: Docs
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
build:
# CI runs on public repositories only: private ones draw on the org's Actions quota, which can be billed. Delete this line to opt in.
if: ${{ !github.event.repository.private }}
runs-on: ubuntu-latest
env:
# Pages serves the book under /<repository name>/.
BASE_URL: /${{ github.event.repository.name }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24.x
- uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
python-version: "3.13"
- run: uv sync --extra docs
- run: uv run jupyter book build --html
working-directory: docs
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: docs/_build/html
deploy:
# Pull requests only check that the book builds.
if: ${{ github.event_name == 'push' && !github.event.repository.private }}
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: pages
cancel-in-progress: false
steps:
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1