-
Notifications
You must be signed in to change notification settings - Fork 15
39 lines (32 loc) · 867 Bytes
/
deploy.yml
File metadata and controls
39 lines (32 loc) · 867 Bytes
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
name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install "jupyter-book<2" ghp-import
- name: Build site
run: |
rm -rf _build/
jupyter-book build . 2>&1
if [ ! -d "_build/html" ]; then
echo "ERROR: _build/html directory not found — build likely failed"
exit 1
fi
- name: Copy CNAME
run: cp CNAME _build/html/
- name: Deploy to GitHub Pages
run: ghp-import -n -p -f _build/html
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}