-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (48 loc) · 1.5 KB
/
deploy.yml
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
53
54
55
56
57
58
# GitHub Actions workflow to build and deploy a Jupyter Book to GitHub Pages
# This workflow runs when changes are pushed to the main branch
# It sets up Python, installs dependencies, builds the book, and deploys it
name: deploy-book
on:
push:
branches:
- main
jobs:
deploy-book:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: '3.11'
activate-environment: jupyter-book
environment-file: requirements-book.yml
auto-activate-base: false
- name: Build the book
shell: bash -l {0} # This ensures conda environment is properly activated
run: |
conda info
conda list
ls -la chapters/
jupyter-book config sphinx .
jupyter-book build . --verbose 2>&1 | tee build.log
cat build.log
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4