11name : deploy-book
22
3- # Only run this when the main branch changes
43on :
54 push :
65 branches :
76 - main
8- # If your git repository has the Jupyter Book within some-subfolder next to
9- # unrelated files, you can make this run only if a file within that specific
10- # folder has been modified.
11- #
12- # paths:
13- # - some-subfolder/**
147
15- # This job installs dependencies, builds the book, and pushes it to `gh-pages`
168jobs :
179 deploy-book :
1810 runs-on : ubuntu-latest
1911 steps :
20- - uses : actions/checkout@v2
12+ - uses : actions/checkout@v2
2113
22- # Install dependencies
23- - name : Set up Python 3.8
24- uses : actions/setup-python@v2
25- with :
26- python-version : 3.8
14+ # Set up Python 3.11 (needed for latest packages)
15+ - name : Set up Python
16+ uses : actions/setup-python@v4
17+ with :
18+ python-version : 3.11
2719
28- - name : Install dependencies
29- run : |
30- pip install -r requirements.txt
20+ # Install system dependencies required by PyTables
21+ - name : Install system dependencies
22+ run : |
23+ sudo apt-get update
24+ sudo apt-get install -y libhdf5-dev build-essential python3-dev
3125
32- # Build the book
33- - name : Build the book
34- run : |
35- jupyter-book build --config _config.yml --toc _toc.yml .
36- # Push the book's HTML to github-pages
37- - name : GitHub Pages action
38- uses : peaceiris/actions-gh-pages@v3.6.1
39- with :
40- github_token : ${{ secrets.GITHUB_TOKEN }}
41- publish_dir : ./_build/html
26+ # Install Python dependencies
27+ - name : Install dependencies
28+ run : |
29+ python -m pip install --upgrade pip wheel setuptools
30+ pip install -r requirements.txt
31+
32+ # Build the book
33+ - name : Build the book
34+ run : |
35+ jupyter-book build --config _config.yml --toc _toc.yml .
36+
37+ # Push to GitHub Pages
38+ - name : GitHub Pages action
39+ uses : peaceiris/actions-gh-pages@v3.6.1
40+ with :
41+ github_token : ${{ secrets.GITHUB_TOKEN }}
42+ publish_dir : ./_build/html
0 commit comments