Skip to content

Commit d6e65d3

Browse files
committed
Add NEXT_PUBLIC_API_BASE_URL during build
1 parent de58e7d commit d6e65d3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,13 @@ jobs:
5959
run: gcloud auth configure-docker --quiet
6060

6161
- name: Build and Push Frontend
62+
env:
63+
API_URL: ${{ secrets.NEXT_PUBLIC_API_BASE_URL }}
6264
run: |-
6365
# Build using the frontend folder as context
64-
docker build -t gcr.io/$PROJECT_ID/frontend-service:${{ github.sha }} ./frontend
66+
docker build \
67+
--build-arg NEXT_PUBLIC_API_BASE_URL="$API_URL" \
68+
-t gcr.io/$PROJECT_ID/frontend-service:${{ github.sha }} ./frontend
6569
docker push gcr.io/$PROJECT_ID/frontend-service:${{ github.sha }}
6670
6771
- name: Deploy Frontend to Cloud Run

0 commit comments

Comments
 (0)