From 183203f1d7be179205e1c243d8c1874c2b4e41f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Ign=C3=A1cio=20Fontoura=20Solla?= Date: Fri, 31 Jul 2026 23:32:19 -0300 Subject: [PATCH] ci(deploy): unset CI test DATABASE_URL before vercel build Workflow env pointed vercel build at localhost teqo_test; Payload migrate then ECONNREFUSED. Drop test DB/secret/site URL so pull's production .env is what the build uses. --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1be94696..133c031d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -212,6 +212,10 @@ jobs: if: steps.tip.outputs.stale != 'true' run: | set -euo pipefail + # Workflow-level env points at the CI teqo_test service. Drop it so + # `vercel build` uses `.vercel/.env.production.local` from `vercel pull` + # (otherwise Payload migrate hits 127.0.0.1:5432 → ECONNREFUSED). + unset DATABASE_URL PAYLOAD_SECRET NEXT_PUBLIC_SITE_URL # Canonical CI link (Vercel KB): env VERCEL_*_ID + pull → build → deploy --prebuilt. # "Could not retrieve Project Settings" usually means bad/expired token or wrong IDs (403). vercel pull --yes --environment=production --token="$VERCEL_TOKEN"