-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (68 loc) · 2.03 KB
/
deploy.yml
File metadata and controls
80 lines (68 loc) · 2.03 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
73
74
75
76
77
78
79
80
# Builds the MyST/Jupyter Book site and publishes it to GitHub Pages
# using GitHub's official deploy-pages flow.
#
# One-time setup in the repository:
# Settings → Pages → Source: "GitHub Actions"
#
# Note: this workflow replaces the previous peaceiris/actions-gh-pages
# flow. The old gh-pages branch can safely be deleted once a deployment
# from this workflow has succeeded.
name: Deploy Jupyter Book
on:
push:
branches:
- main
# BASE_URL must point at the sub-path GitHub Pages serves the site from.
# For a project page at https://<owner>.github.io/<repo>/ this is /<repo>.
env:
BASE_URL: /${{ github.event.repository.name }}
# Permissions required by the official Pages flow.
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, but don't cancel in-progress
# production deployments — let them finish.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: '22'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "jupyter-book>=2.0.0a0"
pip install "mystmd==1.6.0"
pip install -r requirements.txt
- name: Build Jupyter Book HTML
run: |
cd book
myst build --html --execute
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: ./book/_build/html
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5