1name: deploy
2on:
3 push:
4 branches: [main]
5 workflow_dispatch:
7permissions:
8 contents: read
9 pages: write
10 id-token: write
12concurrency:
13 group: pages
14 cancel-in-progress: true
16jobs:
17 build-deploy:
18 runs-on: ubuntu-latest
19 # The whole job is a few minutes of npm and vite. A cap means a wedged
20 # step releases the runner instead of holding its only job slot, which
21 # blocks every later run behind it.
22 timeout-minutes: 15
23 steps:
24 - uses: actions/checkout@v4
25 # The app imports instrawave's host sources through a file:
26 # dependency on the sibling checkout, which is the vault layout; the
27 # lockfile pins that link, so the sibling has to exist before npm ci.
28 # checkout can only write inside the workspace, hence the move.
29 - uses: actions/checkout@v4
30 with:
31 repository: proof-of-concept/instrawave
32 # ref defaults to the SHA that triggered this run, which is a
33 # commit of THIS repository and means nothing in that one.
34 ref: main
35 path: _deps/instrawave
36 - run: |
37 rm -rf ../instrawave # a reused workspace may hold one
38 mv _deps/instrawave ../instrawave
39 rmdir _deps
40 test -f ../instrawave/src/host/session.ts
41 # --ignore-scripts skips the `webgpu` package's install step (prebuilt
42 # Google Dawn) that instrawave's optional dependency would pull; only
43 # its CLI and GPU tests use it, and the page build needs nothing from
44 # it.
45 - uses: actions/setup-node@v4
46 with:
47 node-version: 24
48 - run: npm ci --ignore-scripts
49 # The onset, feature, classifier, mix, and wav checks run on synthetic
50 # audio and need no microphone and no GPU, so they gate the deploy.
51 - run: npm test
52 # configure-pages runs before the build on mochi, not after. The page
53 # is built with relative URLs, so the base path it reports is not
54 # needed here, but the ordering is the one that would work if it were.
55 - uses: actions/configure-pages@v5
56 - run: npm run build
57 - uses: actions/upload-pages-artifact@v3
58 with:
59 path: dist
60 - uses: actions/deploy-pages@v4