-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (51 loc) · 1.31 KB
/
docs.yaml
File metadata and controls
60 lines (51 loc) · 1.31 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: Deploy Jupyter Book
on:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs.yaml"
pull_request:
paths:
- "docs/**"
- ".github/workflows/docs.yaml"
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Install Jupyter Book 2.0 and MyST
run: |
uv pip install --pre "jupyter-book==2.*" --system
npm install -g mystmd
- name: Build book
run: |
cd docs
rm -rf _build .jupyter_cache
myst clean || true
myst build --html
touch _build/html/.nojekyll
env:
BASE_URL: /policyengine-uk-data
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/_build/html
clean: true