1.8 KiB
1.8 KiB
name, description
| name | description |
|---|---|
| deploy-production | Deploy SHD.build main to production through Gitea Actions and verify the live application. Use for a production release or a failed production deployment. |
Deploy Production
Production deploys from main through Validate and deploy production. The workflow builds the candidate while the current app remains online, stops only the SHD app and scheduler, creates a database backup, migrates, then health-checks the replacement.
Workflow
- Confirm that the commit passed
npm run checkandnpm run build, then push it tomainthroughgit@git.jb.codes:jb/shd.build.git. - Open the Gitea production workflow for that commit. Confirm
validateanddeployboth succeed. - Verify
https://shd.build/api/health. Confirmreadyis true and the database check reportsok. - When host access is required, use
ssh f302and inspect/opt/shd-build-productionwith its.env.deployandcompose.production.ymlfiles. Confirm the app is healthy and the scheduler is running.
Migration Failure
- Open the failed
Deploy productionlog and identify the failing statement and target schema state. - Do not patch the production database by hand. Fix the idempotent migration in source, validate it locally, commit it, and push a new commit.
- The next workflow deployment creates a new production backup before it retries the migration. Confirm the recovery deployment reaches a healthy app state.
Guardrails
- Do not use
docker compose down --volumesor delete production volumes. - Do not run a second manual deployment while a Gitea deployment is active.
- Routine deployment preserves production data. Use
replace-production-databaseonly with explicit approval for a full clone. - Report the commit SHA, workflow result, production health response, and backup path from any migration attempt.