/ concept-collection / surfacefun-interactive
Sign in
concept-collection / surfacefun-interactive
57 lines · 1.4 KBBlameHistoryRaw
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 refine_demo.m
34 # loads via uihtml. build-site then bundles app/dist/index.html into the
35 # project (the rest of app/ is excluded via .numblignore).
36 - name: Build figure app
37 run: |
38 cd app
39 npm ci
40 npm run build
42 - uses: flatironinstitute/numbl/.github/actions/build-site@main
43 with:
44 project-dir: .
45 # Build numbl from the main branch (development version, which includes
46 # the uihtml two-way data/event bridge) rather than the npm release.
47 numbl-ref: main
49 deploy:
50 needs: build
51 runs-on: ubuntu-latest
52 environment:
53 name: github-pages
54 url: ${{ steps.deployment.outputs.page_url }}
55 steps:
56 - id: deployment
57 uses: actions/deploy-pages@v4
moveopenescclose