-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.06 KB
/
deploy-jupyter-book.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
name: Deploy Jupyter Book
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --no-cache-dir -r binder/requirements.txt
python -m pip install --no-cache-dir -r book/requirements.txt
- name: Build the book
run: |
jupyter-book build book/
- name: Deploy Jupyter book to GitHub pages
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: book/_build/html
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: Deploy to GitHub pages