Skip to content

Commit

Permalink
added github action for building and deploying the jupyter book
Browse files Browse the repository at this point in the history
  • Loading branch information
sopheck committed Apr 16, 2024
1 parent 79d6adc commit 3e7858b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 18 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-and-deploy-book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: build-and-deploy-book

# Run this when the master or main branch changes
on:
push:
branches:
- main

# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- uses: actions/checkout@v3

# Install dependencies
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install dependencies
run: |
pip install -r requirements.txt
# Build the book
- name: Build the book
run: |
jupyter-book build .
# Upload the book's HTML as an artifact
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "_build/html"

# Deploy the book's HTML to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
18 changes: 0 additions & 18 deletions .github/workflows/github-actions-demo.yml

This file was deleted.

0 comments on commit 3e7858b

Please sign in to comment.