Skip to content

Commit 5c1be15

Browse files
committed
ci: JupyterBook发布
1 parent 32da540 commit 5c1be15

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: jupyterbook-publish
2+
3+
# Only run this when the master branch changes
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
# If your git repository has the Jupyter Book within some-subfolder next to
10+
# unrelated files, you can make this run only if a file within that specific
11+
# folder has been modified.
12+
#
13+
# paths:
14+
# - some-subfolder/**
15+
16+
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
17+
jobs:
18+
deploy-book:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
# Install dependencies
24+
- name: Set up Python 3.9
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
29+
- name: Install dependencies
30+
run: |
31+
pip install jupyter-book
32+
33+
# Build the book
34+
- name: Build the book
35+
run: |
36+
jupyter-book build .
37+
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: ./_build/html

0 commit comments

Comments
 (0)