Skip to content

Commit 1ceed72

Browse files
Create deploy-book.yml
1 parent a67d783 commit 1ceed72

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/deploy-book.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# In .github/workflows/deploy-book.yml
2+
name: Deploy Jupyter Book
3+
4+
# Controls when the action will run
5+
on:
6+
# Run on pushes to your default branch (main or master)
7+
push:
8+
branches: ["main"] # Change to "master" if that's your default branch
9+
10+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11+
jobs:
12+
build-and-deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.11'
22+
23+
- name: Install Dependencies
24+
run: |
25+
pip install jupyter-book ghp-import
26+
27+
- name: Build the Book
28+
run: |
29+
jupyter-book build .
30+
31+
- name: Deploy to GitHub Pages
32+
uses: peaceiris/actions-gh-pages@v4
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./_build/html

0 commit comments

Comments
 (0)