To enable automatic deployment to GitHub Pages, you need to configure your repository settings:
- Go to your repository on GitHub
- Navigate to Settings → Pages
- Under Source, select GitHub Actions from the dropdown
- Save the settings
The URL will be: https://<username>.github.io/xeus-lean/
The CI workflow (.github/workflows/ci.yml) automatically:
- WASM Build Job: Builds the JupyterLite site with the xeus-lean WASM kernel
- Deploy Pages Job: Deploys the built site to GitHub Pages (only on main branch pushes)
This means GitHub Pages is not enabled or not configured to use GitHub Actions as the source.
Solution: Follow the steps above to enable GitHub Pages with "GitHub Actions" as the source.
Ensure the repository has the following workflow permissions:
- Go to Settings → Actions → General
- Under Workflow permissions, select Read and write permissions
- Check Allow GitHub Actions to create and approve pull requests
Check that:
- The
wasm-buildjob completes successfully - The
upload-pages-artifactstep in thewasm-buildjob runs - The artifact named
github-pagesis created - GitHub Pages is enabled with the correct source
Before deploying, you can test the JupyterLite site locally:
# Using pixi
pixi install -e wasm-build --no-lockfile-update
pixi install -e wasm-host --no-lockfile-update
pixi run -e wasm-build fix-emscripten-links
lake build REPL WasmRepl
pixi run -e wasm-build emcmake cmake -S . -B wasm-build -DCMAKE_BUILD_TYPE=Release
pixi run -e wasm-build emmake make -C wasm-build
PREFIX=$(pixi info -e wasm-host --json | python3 -c "import sys,json; print(json.load(sys.stdin)['environments_info'][0]['prefix'])")
cmake --install wasm-build --prefix "$PREFIX"
# Build and serve JupyterLite
mkdir -p notebooks
pixi run -e wasm-build jupyter lite build \
--XeusAddon.prefix="$PREFIX" \
"--XeusAddon.default_channels=[https://conda.anaconda.org/conda-forge]" \
--contents notebooks \
--output-dir _output
# Serve locally
python3 -m http.server 8000 --directory _outputThen open http://localhost:8000 in your browser.
If you prefer to deploy manually:
# Build the site
make deploy
# The output will be in _output/ directory
# You can then deploy this directory to any static hosting serviceThe shell.nix file provides a development environment with all necessary dependencies:
nix-shell
# Now you have access to:
# - cmake, pkg-config
# - elan (Lean 4 toolchain manager)
# - Python 3.11 with Jupyter, NumPy, etc.
# - Node.js 23 (required for WASM Memory64 support)
# - emscripten
# - Build tools (clang, libc++, etc.)The GitHub Actions workflow builds and tests on every push:
-
Native Build (
native-buildjob):- Builds the native Linux x86_64 kernel
- Uploads the
xleanbinary as an artifact
-
WASM Build (
wasm-buildjob):- Sets up emscripten via pixi
- Builds the WASM kernel with Memory64 support
- Runs tests with Node.js 23
- Builds the JupyterLite site
- Uploads the site for Pages deployment
-
Deploy Pages (
deploy-pagesjob):- Runs only on
mainbranch pushes - Deploys the artifact to GitHub Pages
- Requires proper repository settings (see above)
- Runs only on