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.
This commit is contained in:
Francisco Ignácio Fontoura Solla 2026-07-31 23:32:19 -03:00
parent 974d444883
commit 183203f1d7

View file

@ -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"