Skip to content

Added files for Intermediate Python Session 2 #11

Added files for Intermediate Python Session 2

Added files for Intermediate Python Session 2 #11

Workflow file for this run

name: Build and Publish JupyterLite to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
# 1) Install JupyterLite core (with contents indexer) + Pyodide kernel
# Pin to the same 0.6.x line to avoid runtime mismatches.
- name: Install JupyterLite + Pyodide kernel (pinned)
run: |
python -m pip install --upgrade pip
pip install "jupyterlite-core[contents]==0.6.*" "jupyterlite-pyodide-kernel==0.6.*"
# 2) Build the site and SELF-HOST Pyodide assets (no CDN at runtime)
# Using a Pyodide release tarball avoids corporate CDN blocks.
- name: Build site (bundle Pyodide)
run: |
jupyter lite build \
--contents ./content \
--output-dir ./_output \
--pyodide https://github.com/pyodide/pyodide/releases/download/0.27.1/pyodide-0.27.1.tar.bz2
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_output
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4