Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit 2f09b1e

Browse files
committed
add gh actions config to build and deploy to gh-pages
1 parent 9bfd7f7 commit 2f09b1e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/build-gh-pages.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: deploy-book
2+
3+
# Only run this when the main branch changes
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
# This job installs dependencies, build the book, and pushes it to `gh-pages`
10+
jobs:
11+
deploy-book:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
# Install dependencies
17+
- name: Set up Python 3.7
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.7
21+
22+
- name: Install dependencies
23+
run: |
24+
pip install -r requirements.txt
25+
pip install jupyter-book
26+
27+
# Build the book
28+
- name: Build the book
29+
run: |
30+
jupyter-book build .
31+
32+
# Push the book's HTML to github-pages
33+
- name: GitHub Pages action
34+
uses: peaceiris/actions-gh-pages@v3.6.1
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./_build/html

0 commit comments

Comments
 (0)