From 68075edb774000bed11f17a5a93d719d79ace4cb Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Wed, 11 Mar 2026 19:06:53 +0100 Subject: [PATCH] fix(ci): increase migration retry attempts to prevent flaky deployments --- .gitea/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 0ce55b0..d58cf86 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -341,11 +341,11 @@ jobs: # Apply Payload Migrations using the target app container's programmatic endpoint ssh root@alpha.mintel.me "cd $SITE_DIR && echo '→ Waiting for DB and Running Payload Migrations...' && \ - for i in {1..5}; do \ + for i in {1..10}; do \ echo \"Attempt \$i...\"; \ docker compose -p '${{ needs.prepare.outputs.project_name }}' --env-file '$ENV_FILE' exec -T mb-grid-app sh -c 'curl -s -f -X POST -H \"Authorization: Bearer \$PAYLOAD_SECRET\" http://localhost:3000/api/payload/migrate \ || { echo \"HTTP error or DB not ready.\"; exit 1; }' && { echo '✅ Migrations successful!'; break; } \ - || { if [ \$i -eq 5 ]; then echo '❌ Migration failed after 5 attempts!'; exit 1; else echo '⏳ Retrying in 5s...'; sleep 5; fi; }; \ + || { if [ \$i -eq 10 ]; then echo '❌ Migration failed after 10 attempts!'; exit 1; else echo '⏳ Retrying in 5s...'; sleep 5; fi; }; \ done" ssh root@alpha.mintel.me "docker system prune -f --filter 'until=24h'"