When webapp/ or this workflow changes on main, build the Vite app and
publish docs/app/ via the official GitHub Pages actions. Manual run via
workflow_dispatch is supported for backfill or first-time setup.
Pipeline:
checkout → setup-node@v6 (Node 22, npm cache keyed on
webapp/package-lock.json) → npm ci → npm run build → configure-pages →
upload-pages-artifact (docs/app/) → deploy-pages.
Permissions limited to contents:read, pages:write, id-token:write
(required for the OIDC token deploy-pages uses). Concurrency group
'pages' with cancel-in-progress:false so two pushes in quick succession
both publish in order rather than dropping the earlier one.
One-time setup the repo owner needs to do: GitHub repo Settings → Pages
→ Source = 'GitHub Actions'. After that, every push to main that
touches webapp/ ships automatically.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>