Skip to content

add pypsa revised tutorial #166

add pypsa revised tutorial

add pypsa revised tutorial #166

Workflow file for this run

name: deploy
on:
# Trigger the workflow on push to main branch
push:
branches:
- main
# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
build-and-deploy-book:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- uses: actions/checkout@v5
# Install dependencies
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
cache: pip
- name: Install environment with pip
run: pip install -r requirements.txt
# Build the book
- name: Build the book
run: |
jupyter-book build data-science-for-esm
# cache notebooks
- name: cache executed notebooks
uses: actions/cache@v4
with:
path: _build/.jupyter_cache
key: jupyter-book-cache-${{ hashFiles('requirements.txt') }}
# https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow
# Upload the book's HTML as an artifact
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: data-science-for-esm/_build/html
# Deploy the book's HTML to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4