Skip to content

add github action

add github action #1

Workflow file for this run

name: Build & Deploy Jupyter Book
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install jupyter-book==1.0.3
- name: Build Jupyter Book
run: |
jupyter-book build .
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _build/html
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4