Skip to content

Adding the missing environment for deployment #8

Adding the missing environment for deployment

Adding the missing environment for deployment #8

Workflow file for this run

name: deploy-book
# Only run this when the master branch changes
on:
push:
branches:
- main
# If your git repository has the Jupyter Book source in a subdirectory
# such as `source/`, add it here
paths:
- '**'
# 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
# Add this environment block
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
# Install dependencies
- name: Set up Python
uses: actions/setup-python@v5
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 artifact
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _build/html
# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment # Add this id to reference in the environment url
uses: actions/deploy-pages@v4
if: github.ref == 'refs/heads/main'