1name: Deploy numbl project to GitHub Pages
3# Builds the single-file web app, bundles this numbl project with the browser
4# IDE, and publishes it to GitHub Pages on every push to main.
5#
6# One-time setup: Settings → Pages → "Build and deployment" → Source →
7# "GitHub Actions".
9on:
10 push:
11 branches: [main]
12 workflow_dispatch:
14permissions:
15 contents: read
16 pages: write
17 id-token: write
19concurrency:
20 group: pages
21 cancel-in-progress: false
23jobs:
24 build:
25 runs-on: ubuntu-latest
26 steps:
27 - uses: actions/checkout@v4
29 - uses: actions/setup-node@v6
30 with:
31 node-version: 24
33 # Build the single-file figure app (app/dist/index.html) that
34 # walnuts_sampler.m loads via uihtml. build-site then bundles
35 # app/dist/index.html into the project (the rest of app/ is excluded via
36 # .numblignore).
37 - name: Build figure app
38 run: |
39 cd app
40 npm ci
41 npm run build
43 - uses: flatironinstitute/numbl/.github/actions/build-site@main
44 with:
45 project-dir: .
46 # Build numbl from the main branch (development version, which includes
47 # the uihtml two-way data/event bridge) rather than the npm release.
48 numbl-ref: main
49 # Keep the (mostly empty) output panel small so the interactive figure
50 # panel below it gets most of the height on first load.
51 max-initial-output-panel-height: 100
53 deploy:
54 needs: build
55 runs-on: ubuntu-latest
56 environment:
57 name: github-pages
58 url: ${{ steps.deployment.outputs.page_url }}
59 steps:
60 - id: deployment
61 uses: actions/deploy-pages@v4