attempt a fix for the kernel dying #5
This file contains hidden or 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 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.11' | |
| # 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 |