Add github-pages to environment #3
This file contains 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 | |
jobs: | |
build-book: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Jupyter Book | |
run: pip install jupyter-book | |
- name: Build the book | |
run: jupyter-book build . | |
- name: Package the HTML files into an artifact for GitHub Pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "_build/html" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |