File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed
Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Jupyter Book
2+
3+ on :
4+ # Trigger the workflow on push to main branch
5+ push :
6+ branches :
7+ - main
8+ # Allow manual triggering of the workflow
9+ workflow_dispatch :
10+
11+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+ permissions :
13+ contents : read
14+ pages : write
15+ id-token : write
16+
17+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+ concurrency :
20+ group : " pages"
21+ cancel-in-progress : false
22+
23+ jobs :
24+ # Build job
25+ build :
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Checkout
29+ uses : actions/checkout@v4
30+
31+ - name : Set up Python
32+ uses : actions/setup-python@v4
33+ with :
34+ python-version : " 3.11"
35+
36+ - name : Install dependencies
37+ run : |
38+ python -m pip install --upgrade pip
39+ pip install -r jupyterbook/requirements.txt
40+
41+ - name : Build the book
42+ run : |
43+ jupyter-book build jupyterbook
44+
45+ - name : Setup Pages
46+ uses : actions/configure-pages@v3
47+
48+ - name : Upload artifact
49+ uses : actions/upload-pages-artifact@v2
50+ with :
51+ path : jupyterbook/_build/html
52+
53+ # Deployment job
54+ deploy :
55+ environment :
56+ name : github-pages
57+ url : ${{ steps.deployment.outputs.page_url }}
58+ runs-on : ubuntu-latest
59+ needs : build
60+ steps :
61+ - name : Deploy to GitHub Pages
62+ id : deployment
63+ uses : actions/deploy-pages@v2
You can’t perform that action at this time.
0 commit comments