55
66# workflow_dispatch:
77 push :
8- branches :
9- - jupyterbook
8+ branches : [main]
109# # If your git repository has the Jupyter Book within some-subfolder next to
1110# # unrelated files, you can make this run only if a file within that specific
1211# # folder has been modified.
1312# #
1413# # paths:
1514# # - some-subfolder/**
1615
16+ env :
17+ # `BASE_URL` determines, relative to the root of the domain, the URL that your site is served from.
18+ # E.g., if your site lives at `https://mydomain.org/myproject`, set `BASE_URL=/myproject`.
19+ # If, instead, your site lives at the root of the domain, at `https://mydomain.org`, set `BASE_URL=''`.
20+ BASE_URL : /${{ github.event.repository.name }}
21+
22+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
23+ permissions :
24+ contents : read
25+ pages : write
26+ id-token : write
27+
28+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
29+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
30+ concurrency :
31+ group : ' pages'
32+ cancel-in-progress : false
33+
1734# This job installs dependencies, builds the book, and pushes it to `gh-pages`
1835jobs :
1936 deploy-book :
37+ environment :
38+ name : github-pages
39+ url : ${{ steps.deployment.outputs.page_url }}
2040 runs-on : ubuntu-latest
2141 steps :
22- - uses : actions/checkout@v2
42+ - uses : actions/checkout@v4
2343
24- # Install dependencies
25- - name : Set up Python 3.8
26- uses : actions/setup-python@v1
44+ # Install dependencies to process page files
45+ - name : Set up Python 3.13
46+ uses : actions/setup-python@v6
2747 with :
28- python-version : 3.8
48+ python-version : ' 3.13 '
2949
3050 - name : Install dependencies
3151 run : |
@@ -34,15 +54,35 @@ jobs:
3454 - name : Process files
3555 run : |
3656 python ci/process_files.py
37-
57+
58+ # setup pages, build book, and deploy
59+ - name : Setup Pages
60+ uses : actions/configure-pages@v3
61+ # - uses: actions/setup-node@v4
62+ # with:
63+ # node-version: 18.x
64+ # - name: Install Jupyter Book (via myst)
65+ # run: npm install -g jupyter-book
66+ - name : Build HTML Assets
67+ run : jupyter-book build .
68+
69+ # run: jupyter-book build --html
70+ - name : Upload artifact
71+ uses : actions/upload-pages-artifact@v3
72+ with :
73+ path : ' ./_build/html'
74+ - name : Deploy to GitHub Pages
75+ id : deployment
76+ uses : actions/deploy-pages@v4
77+
3878 # Build the book
39- - name : Build the book
40- run : |
41- jupyter-book build .
79+ # - name: Build the book
80+ # run: |
81+ # jupyter-book build .
4282
4383 # Push the book's HTML to github-pages
44- - name : GitHub Pages action
45- 46- with :
47- github_token : ${{ secrets.GITHUB_TOKEN }}
48- publish_dir : ./_build/html
84+ # - name: GitHub Pages action
85+ # uses: peaceiris/[email protected] 86+ # with:
87+ # github_token: ${{ secrets.GITHUB_TOKEN }}
88+ # publish_dir: ./_build/html
0 commit comments