From fbaeba2ddcc6208cd40817b4fffad5a9c027bcb6 Mon Sep 17 00:00:00 2001 From: longwind48 Date: Mon, 16 Dec 2024 02:09:32 +0800 Subject: [PATCH] ci: attempt 1 to access env in staging env --- .github/workflows/firebase-hosting-staging.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/firebase-hosting-staging.yml b/.github/workflows/firebase-hosting-staging.yml index 707dad2..9b15d14 100644 --- a/.github/workflows/firebase-hosting-staging.yml +++ b/.github/workflows/firebase-hosting-staging.yml @@ -35,14 +35,18 @@ jobs: - name: Install dependencies and build env: APP_ENV: staging - NEXT_PUBLIC_API_BASE_URL: ${{ env.NEXT_PUBLIC_API_BASE_URL }} + NEXT_PUBLIC_API_BASE_URL: ${{ vars.NEXT_PUBLIC_API_BASE_URL }} run: | cd frontend npm ci npm install sharp npm run build - - name: Debug - run: echo "API URL is $NEXT_PUBLIC_API_BASE_URL" + - name: Debug Variables + run: | + echo "Using vars context: ${{ vars.NEXT_PUBLIC_API_BASE_URL }}" + echo "Current branch: ${{ github.ref_name }}" + echo "All environment variables:" + env - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: ${{ secrets.GITHUB_TOKEN }} @@ -53,4 +57,4 @@ jobs: entryPoint: ./frontend env: FIREBASE_CLI_EXPERIMENTS: webframeworks - NEXT_PUBLIC_API_BASE_URL: ${{ env.NEXT_PUBLIC_API_BASE_URL }} + NEXT_PUBLIC_API_BASE_URL: ${{ vars.NEXT_PUBLIC_API_BASE_URL }}