forked from bai/curriculum-project-hub
ci: deploy Hub admin SPA fleets via Gitea Actions
Add deploy_fleet_release.sh and a workflow that rolls immutable Hub releases (including admin-web) to educraft-dev on push/PR and educraft on main/tags, selecting silos by HUB_PUBLIC_BASE_URL middle domain.
This commit is contained in:
@@ -11,6 +11,32 @@ See [NEW_SILO_RUNBOOK.md](NEW_SILO_RUNBOOK.md). The remainder of this document
|
||||
describes the individual installer and maintenance primitives used by the
|
||||
generated bundle.
|
||||
|
||||
## CI: roll Hub + admin SPA by fleet (`educraft` / `educraft-dev`)
|
||||
|
||||
`.gitea/workflows/deploy-admin.yml` deploys Hub releases (including the org-admin
|
||||
SPA) to the managed Alpha host via `deploy_fleet_release.sh`. Fleets share the
|
||||
host and are selected by the middle DNS label of `HUB_PUBLIC_BASE_URL`:
|
||||
|
||||
| Fleet | Domain | CI trigger |
|
||||
|-------|--------|------------|
|
||||
| **dev** | `https://<slug>.educraft-dev.paradigm-edu.net` | every push + PR (paths under `hub/`) |
|
||||
| **prod** | `https://<slug>.educraft.paradigm-edu.net` | push to `main` + tags |
|
||||
|
||||
Example prod tenant:
|
||||
`https://para-26071100.educraft.paradigm-edu.net/auth/feishu/para-26071100`.
|
||||
|
||||
Required Gitea secret: `DEPLOY_SSH_KEY` (private key for `root@39.107.254.4`).
|
||||
Optional: `DEPLOY_HOST` / `DEPLOY_USER` / `DEPLOY_SSH_PORT` / `DEPLOY_BASE`.
|
||||
Set repository var `ALLOW_EMPTY_FLEET=1` until the first silo exists for a fleet.
|
||||
|
||||
Local dry-run against the host:
|
||||
|
||||
```sh
|
||||
CPH_FLEET=dev \
|
||||
PLATFORM_DEPLOY_SSH_KEY=$HOME/.ssh/id_ed25519 \
|
||||
bash hub/deploy/deploy_fleet_release.sh
|
||||
```
|
||||
|
||||
The supervised alpha runs one Organization per named Silo. The supported host
|
||||
has systemd, PostgreSQL, Node.js 24+, `pg_isready`, `runuser`, `setpriv`,
|
||||
bubblewrap, `socat`, `pg_dump`, `tar`, `sha256sum`, and a compatible `cph`.
|
||||
|
||||
Reference in New Issue
Block a user