Merge pull request #33 from Pseudo-Lab/feat/add-img #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy Jupyter Book | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'book/**' | |
| 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" |