-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (30 loc) ยท 889 Bytes
/
deploy.yml
File metadata and controls
37 lines (30 loc) ยท 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build and Deploy Jupyter Book
on:
push:
branches:
- main
paths:
- 'book/**'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Jupyter Book
run: |
pip install -U pip
pip install jupyter-book ghp-import
- name: Build Jupyter Book
run: |
set -e # ์ค๋ฅ ๋ฐ์ ์ ์คํฌ๋ฆฝํธ ์ค์ง
jupyter-book build book || { echo "Jupyter Book build failed!"; exit 1; }
- name: Deploy to GitHub Pages
run: |
COMMIT_ID=$(git rev-parse --short HEAD)
ghp-import -n -p -f book/_build/html -m "Deploying Jupyter Book - Commit: $COMMIT_ID"