From e9ee93c5dcfe0d82f923de01c40acf3df87b6e64 Mon Sep 17 00:00:00 2001 From: dcs-soni <52232900+dcs-soni@users.noreply.github.com> Date: Sun, 9 Nov 2025 15:09:04 +0530 Subject: [PATCH] fix: remove hardcoded API URL from frontend build --- .github/workflows/build-and-push.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 65df39d..9c464b7 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -148,16 +148,6 @@ jobs: org.opencontainers.image.description=Taskerra Frontend Web Application org.opencontainers.image.vendor=Taskerra - # Determine API URL based on branch - - name: Set API URL - id: api_url - run: | - if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then - echo "VITE_API_URL=https://api.taskerra.com" >> $GITHUB_OUTPUT - else - echo "VITE_API_URL=http://localhost:3002/api/v1" >> $GITHUB_OUTPUT - fi - - name: Build and push Frontend image uses: docker/build-push-action@v5 with: @@ -168,8 +158,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - build-args: | - VITE_API_URL=${{ steps.api_url.outputs.VITE_API_URL }} + # Removed args as no VITE_API_URL needed - using relative URLs in production - name: Output image details run: | @@ -178,7 +167,7 @@ jobs: echo '```' >> $GITHUB_STEP_SUMMARY echo "${{ steps.meta.outputs.tags }}" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY - echo "**API URL:** ${{ steps.api_url.outputs.VITE_API_URL }}" >> $GITHUB_STEP_SUMMARY + echo "**API URL:** Relative URLs (/api/v1) - proxied by nginx" >> $GITHUB_STEP_SUMMARY notify: name: Notify Build Status