Skip to content

Commit 7a3254f

Browse files
committed
Add Deploy Book Workflow
1 parent c53f715 commit 7a3254f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/deploy-book.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: deploy-book
2+
3+
# Only run this when the main branch changes
4+
on:
5+
push:
6+
branches:
7+
- master
8+
# If your git repository has the Jupyter Book within some-subfolder next to
9+
# unrelated files, you can make this run only if a file within that specific
10+
# folder has been modified.
11+
#
12+
# paths:
13+
# - some-subfolder/**
14+
15+
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
16+
jobs:
17+
deploy-book:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
# Install dependencies
23+
- name: Set up Python 3.11
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: 3.11
27+
28+
- name: Install dependencies
29+
run: |
30+
pip install -r requirements.txt
31+
32+
# Build the book
33+
- name: Build the book
34+
run: |
35+
jupyter-book build .
36+
37+
# Push the book's HTML to github-pages
38+
- name: GitHub Pages action
39+
uses: peaceiris/actions-gh-pages@v3
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: ./_build/html

0 commit comments

Comments
 (0)