From 3069cf592811c88b2d1966ec7fd4bb65e034b83b Mon Sep 17 00:00:00 2001 From: sepehr Date: Sun, 17 May 2026 01:28:55 +0200 Subject: [PATCH] fix: add explicit alembic migration step to CI pipeline Entrypoint migration can fail silently. Now runs explicitly: 1. Wait for postgres 2. alembic upgrade head (explicit, fails the deploy if broken) 3. Wait for backend healthy Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index a9150fb..adea63c 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -49,6 +49,9 @@ jobs: sleep 2 done + echo "=== Running database migrations ===" + docker compose exec -T backend alembic upgrade head + echo "=== Waiting for backend healthy ===" for i in $(seq 1 20); do if curl -sf http://localhost:8001/health >/dev/null 2>&1; then