-
Notifications
You must be signed in to change notification settings - Fork 41
52 lines (42 loc) · 1.28 KB
/
deploy.yaml
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 JupyterBook to GitHub pages
on:
push:
branches: [main]
paths:
- "notebooks/**"
- "book/**"
- "ci/envs/environment.yaml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
BuildBook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/envs/environment.yaml
# Step to activate the environment and install the kernel with the name "coastal-env"
- name: Install Jupyter Kernel for CI
run: |
python -m ipykernel install --user --name conda-env-coastal-py --display-name "conda-env-coastal-py"
# Copy notebooks to book notebooks directory
- name: Prepare notebooks for book
run: |
rsync -av --delete notebooks/ book/notebooks/
# Build the JupyterBook
- name: Build JupyterBook
run: |
jupyter-book build book/
- name: Deploy html files
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: book/_build/html