-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (37 loc) · 1010 Bytes
/
deploy-book.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
name: deploy-book
on:
# Trigger the workflow on push to main branch
push:
branches:
- main
workflow_dispatch:
jobs:
build:
uses: ./.github/workflows/build-book.yaml
with:
environment_name: asean2024-pyrad-course
environment_file: environment.yml
path_to_notebooks: ./
deploy:
needs: build
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Download Artifact Book
uses: actions/download-artifact@v3
with:
name: book-zip-${{ github.event.number }}
- name: Unzip the book
run: |
rm -rf _build/html
unzip book.zip
rm -f book.zip
- name: Deploy to GitHub Pages
uses: peaceiris/[email protected]
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html
keep_files: true # This preserves existing previews from open PRs