fix(ci): build admin SPA during wrangler deploy

Cloudflare Workers Build runs "wrangler deploy" on a fresh checkout,
where admin/dist (a gitignored symlink) does not exist, so the deploy
failed with a missing assets.directory.

- add build.command to generate the Nuxt SPA before bundling
- point assets.directory at the real ./admin/.output/public output
  instead of the gitignored admin/dist symlink
This commit is contained in:
RhenCloud 2026-08-02 07:43:11 +08:00
parent 81d21ffb08
commit c3e22de4e6
No known key found for this signature in database
GPG key ID: A574A617378C4E0B

View file

@ -6,8 +6,11 @@
"vars": {
"DISCORD_GATEWAY_ENABLED": "true"
},
"build": {
"command": "cd admin && bun install --frozen-lockfile && bun run generate"
},
"assets": {
"directory": "./admin/dist",
"directory": "./admin/.output/public",
"binding": "ASSETS",
"run_worker_first": true,
"not_found_handling": "single-page-application"