add a one-click deploy script for the self-hosted build
Build / build (push) Canceled after 0s
Playwright / e2e (push) Canceled after 0s

This commit is contained in:
Jack
2026-10-21 17:53:25 +08:00
parent 421ffa0714
commit 90c759c760
2 changed files with 353 additions and 0 deletions
+21
View File
@@ -33,6 +33,27 @@ npm run build
- `npm run test:e2e` runs Playwright browser tests against a mocked BFF API.
- `npm run build` type-checks and builds both client and server.
## One-Click Deploy
`deploy.sh` deploys a checkout to a host that runs the built server under
systemd:
```bash
./deploy.sh # pull, install, build, restart, verify
./deploy.sh --dry-run # print the plan and exit
./deploy.sh --help # all options
```
It pulls `origin/main` with `--ff-only`, reinstalls dependencies only when
`package-lock.json` changed, rebuilds the `node-pty` native module, builds the
client and the server, restarts the `hermes-ui.service` unit, and verifies the
result against both `/health` and `/api/auth/status`. The previous `dist/` is
backed up to `~/.local/state/hermes-ui-deploy/backups/` first and restored
automatically when the build or the health check fails.
`start.sh` is the development launcher (foreground Vite + Koa); `deploy.sh` is
the production path. Do not mix them.
## Platform Notes
The server runs on Windows, macOS, and Linux. The parts that differ are