File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,6 @@ jobs:
104104 tags : ${{ steps.meta.outputs.tags }}
105105 labels : ${{ steps.meta.outputs.labels }}
106106 build-args : |
107- NEXT_PUBLIC_API_URL=${{ vars.NEXT_PUBLIC_API_URL }}
107+ NEXT_PUBLIC_API_URL=${{ vars.NEXT_PUBLIC_API_URL != '' && vars.NEXT_PUBLIC_API_URL || 'http://localhost:8080/api' }}
108108 cache-from : type=gha
109109 cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change @@ -50,9 +50,10 @@ COPY --from=deps /app/packages/tailwind-config/node_modules ./packages/tailwind-
5050# Copy source code
5151COPY . .
5252
53- # Build arguments for environment variables needed at build time
54- ARG NEXT_PUBLIC_API_URL
55- ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
53+ # Build arguments for environment variables needed at build time.
54+ # Default keeps CI/CD builds working even when build-arg is omitted.
55+ ARG NEXT_PUBLIC_API_URL=http://localhost:8080/api
56+ ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
5657
5758# Build the web app (standalone output configured in next.config.ts)
5859RUN pnpm --filter @repo/web build
You can’t perform that action at this time.
0 commit comments