Deploy the app as the repository's static site on push to main, gated by the node test suite
1 changed file+42−0
.github/workflows/deploy.ymladded+42−0View file
@@ -0,0 +1,42 @@
1+name: deploy
2+on:
3+ push:
4+ branches: [main]
5+ workflow_dispatch:
6+
7+permissions:
8+ contents: read
9+ pages: write
10+ id-token: write
11+
12+concurrency:
13+ group: pages
14+ cancel-in-progress: true
15+
16+jobs:
17+ build-deploy:
18+ runs-on: ubuntu-latest
19+ # The job is npm, the node test suite, and a vite build. A cap means a
20+ # wedged step releases the runner instead of holding its only job slot.
21+ timeout-minutes: 15
22+ steps:
23+ - uses: actions/checkout@v4
24+ - uses: actions/setup-node@v4
25+ with:
26+ node-version: 24
27+ - run: npm ci
28+ # The node end-to-end test synthesizes datasets and runs every
29+ # built-in algorithm through numbl, so it gates the deploy without
30+ # needing a browser or a microphone. The playwright smoke test needs
31+ # a system Chrome and stays local.
32+ - run: npm test
33+ # configure-pages runs before the build on mochi. The page is built
34+ # with relative URLs (vite base './'), so the base path it reports is
35+ # not needed here, but the ordering is the one that would work if it
36+ # were.
37+ - uses: actions/configure-pages@v5
38+ - run: npm run build
39+ - uses: actions/upload-pages-artifact@v3
40+ with:
41+ path: dist
42+ - uses: actions/deploy-pages@v4