Add deploy workflow for the vault
The app imports instrawave's host sources through a file: dependency on
the sibling checkout, so the workflow checks that repository out of the
vault and moves it beside the workspace before npm ci. Tests run on
synthetic audio with no microphone and no GPU, so they gate the deploy.
1 changed file+52−0
.github/workflows/deploy.ymladded+52−0View file
@@ -0,0 +1,52 @@
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+ steps:
20+ - uses: actions/checkout@v4
21+ # The app imports instrawave's host sources through a file:
22+ # dependency on the sibling checkout, which is the vault layout; the
23+ # lockfile pins that link, so the sibling has to exist before npm ci.
24+ # checkout can only write inside the workspace, hence the move.
25+ - uses: actions/checkout@v4
26+ with:
27+ repository: proof-of-concept/instrawave
28+ path: _deps/instrawave
29+ - run: |
30+ mv _deps/instrawave ../instrawave
31+ rmdir _deps
32+ test -f ../instrawave/src/host/session.ts
33+ # --ignore-scripts skips the `webgpu` package's install step (prebuilt
34+ # Google Dawn) that instrawave's optional dependency would pull; only
35+ # its CLI and GPU tests use it, and the page build needs nothing from
36+ # it.
37+ - uses: actions/setup-node@v4
38+ with:
39+ node-version: 24
40+ - run: npm ci --ignore-scripts
41+ # The onset, feature, classifier, mix, and wav checks run on synthetic
42+ # audio and need no microphone and no GPU, so they gate the deploy.
43+ - run: npm test
44+ # configure-pages runs before the build on mochi, not after. The page
45+ # is built with relative URLs, so the base path it reports is not
46+ # needed here, but the ordering is the one that would work if it were.
47+ - uses: actions/configure-pages@v5
48+ - run: npm run build
49+ - uses: actions/upload-pages-artifact@v3
50+ with:
51+ path: dist
52+ - uses: actions/deploy-pages@v4