File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : deploy-book
2+
3+ # Run this when the master or main branch changes
4+ on :
5+ push :
6+ branches :
7+ - master
8+
9+ # This job installs dependencies, builds the book, and pushes it to `gh-pages`
10+ jobs :
11+ deploy-book :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ pages : write
15+ id-token : write
16+ steps :
17+ - uses : actions/checkout@v5
18+
19+ # Install dependencies
20+ - name : Set up Python
21+ uses : actions/setup-python@v6
22+ with :
23+ python-version : " 3.13"
24+ cache : pip # Implicitly uses requirements.txt for cache key
25+
26+ - name : Install dependencies
27+ run : pip install -r requirements.txt
28+
29+ # (optional) Cache your executed notebooks between runs
30+ # if you have config:
31+ # execute:
32+ # execute_notebooks: cache
33+ # - name: cache executed notebooks
34+ # uses: actions/cache@v4
35+ # with:
36+ # path: _build/.jupyter_cache
37+ # key: jupyter-book-cache-${{ hashFiles('requirements.txt') }}
38+
39+ # Build the book
40+ - name : Build the book
41+ run : |
42+ jupyter-book build --all .
43+
44+ # https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow
45+
46+ # Upload the book's HTML as an artifact
47+ - name : Upload artifact
48+ uses : actions/upload-pages-artifact@v4
49+ with :
50+ path : _build/html
51+
52+ # Deploy the book's HTML to GitHub Pages
53+ - name : Deploy to GitHub Pages
54+ id : deployment
55+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ jupyter-book
You can’t perform that action at this time.
0 commit comments