Skip to content

Commit 53796c3

Browse files
Merge pull request #6 from qMRLab/mb/jbook
Add github pages action
2 parents b701972 + e516048 commit 53796c3

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/main.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: deploy-book
2+
3+
# Only run this when the v2 branch changes
4+
on:
5+
push:
6+
branches:
7+
- mrathon
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+
# paths:
12+
# - source/**
13+
14+
# This job installs dependencies, build the book, and pushes it to `gh-pages`
15+
jobs:
16+
deploy-book:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
# Install dependencies
22+
- name: Set up Python 3.8
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: 3.8
26+
27+
- name: Install dependencies
28+
run: |
29+
pip install -r binder/requirements.txt
30+
- name: Postbuild
31+
run: |
32+
chmod +xxx binder/postBuild
33+
binder/postBuild
34+
# Build the book
35+
- name: Build the book
36+
run: |
37+
jupyter-book build content/index.ipynb --builder singlehtml
38+
# Push the book's HTML to github-pages
39+
- name: GitHub Pages action
40+
uses: peaceiris/[email protected]
41+
with:
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
publish_dir: ./content/_build/_page/index/singlehtml

0 commit comments

Comments
 (0)