-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (44 loc) · 1.43 KB
/
deploy.yml
File metadata and controls
52 lines (44 loc) · 1.43 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
name: deploy-book
on:
push:
branches:
- main
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
# 1️⃣ Checkout repository
- uses: actions/checkout@v2
# 2️⃣ Set up Python 3.11
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
# 3️⃣ Cache pip packages for faster builds
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# 4️⃣ Install system dependencies for PyTables
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libhdf5-dev build-essential python3-dev
# 5️⃣ Install Python dependencies
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -r requirements.txt
# 6️⃣ Build the Jupyter Book (no notebook execution, fast CI)
- name: Build the Jupyter Book
run: |
jupyter-book build --config _config.yml --toc _toc.yml .
# 7️⃣ Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html