deploy.yaml: add nodejs install (required for actions/checkout)
migrate.yaml: rewrite migration runner
- Use PGHOST/PGUSER/PGPASSWORD env vars (no inline -h/-U/-p flags)
- ON_ERROR_STOP=1 for strict error handling on push
- || true for dispatch (idempotent full replay)
- Verify schema after apply
- fetch-depth: 2 for diff detection
Triggers on:
- Push to main when crates/mem-store/migrations/*.sql changes
- Manual workflow_dispatch (runs ALL migrations)
On push: detects changed migration files, runs only those.
On dispatch: runs all migrations in order (idempotent).
Requires DB_USER + DB_PASSWORD secrets in Forgejo.
Connects to memory-db-rw.poimen.svc.cluster.local.
All migrations use IF NOT EXISTS / IF EXISTS guards.