ci: add guarded production rectification migrations

This commit is contained in:
Jesse_Chen
2026-07-25 02:15:20 +08:00
parent 3fd1d54487
commit 47acaf3f53
2 changed files with 178 additions and 0 deletions
+7
View File
@@ -135,6 +135,13 @@ The server has a persistent 2 GB `/swapfile`. UFW permits only SSH `22000/tcp`,
Production pushes and pull requests do not start GitHub Actions automatically. Run the required validation workflows from the Actions page, then manually start `.github/workflows/deploy-production.yml` for the tested branch. The deployment workflow syncs that revision with `rsync`, preserves `/opt/jyotisha-app/.env.production`, rebuilds both Docker services, and verifies the public login route, logged-out account response, and private Python health endpoint.
For the reviewed conversational rectification and global birthplace schema set,
run `.github/workflows/apply-production-rectification-migrations.yml` with
`operation=check` first. If the ledger and checksums are clean, rerun the same
current-`main` revision with `operation=apply`. The workflow only accepts the
four allowlisted forward migrations, applies each migration and its ledger row
in one transaction, and refuses stale revisions or checksum drift.
Required GitHub Actions secret:
```text