From 7872aef7768abf145b8a4a189c32cd2dd066bbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9D=80=EC=84=9D?= Date: Sat, 28 Feb 2026 11:48:46 +0900 Subject: [PATCH] fix(ci): inject NEXT_PUBLIC_API_BASE into Vercel deploys Frontend was calling localhost:8000 in production because NEXT_PUBLIC_API_BASE was not set at build time. Pass it via vercel deploy -e flag from GitHub Secrets. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci-cd.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index d5dc3c8..aec317f 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -88,7 +88,8 @@ jobs: attempt=1 max_attempts=3 while :; do - if vercel deploy --confirm --token "$VERCEL_TOKEN" --scope "$VERCEL_SCOPE"; then + if vercel deploy --confirm --token "$VERCEL_TOKEN" --scope "$VERCEL_SCOPE" \ + -e NEXT_PUBLIC_API_BASE="${{ secrets.NEXT_PUBLIC_API_BASE_DEV }}"; then break fi @@ -147,7 +148,8 @@ jobs: attempt=1 max_attempts=3 while :; do - if vercel deploy --prod --confirm --token "$VERCEL_TOKEN" --scope "$VERCEL_SCOPE"; then + if vercel deploy --prod --confirm --token "$VERCEL_TOKEN" --scope "$VERCEL_SCOPE" \ + -e NEXT_PUBLIC_API_BASE="${{ secrets.NEXT_PUBLIC_API_BASE_PROD }}"; then break fi