From 00a14e8bae492d906ef90fb24c83657131ecbcb9 Mon Sep 17 00:00:00 2001 From: Joywin Bennis <107112207+joywin2003@users.noreply.github.com> Date: Thu, 12 Sep 2024 09:55:12 +0530 Subject: [PATCH] Refactor: Test 2 with environment variable check --- .github/workflows/test.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8707ae0..1be828c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x] + node-version: [18.x, 20.x] steps: - name: Checkout repository @@ -28,6 +28,18 @@ jobs: - name: Install dependencies run: npm install + - name: Check Environment Variables + run: | + echo "NEXT_PUBLIC_SITE_URL is set: ${{ env.NEXT_PUBLIC_SITE_URL != '' }}" + echo "NEXTAUTH_SECRET is set: ${{ env.NEXTAUTH_SECRET != '' }}" + echo "GOOGLE_ID is set: ${{ env.GOOGLE_ID != '' }}" + echo "GOOGLE_SECRET is set: ${{ env.GOOGLE_SECRET != '' }}" + env: + NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }} + NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} + GOOGLE_ID: ${{ secrets.GOOGLE_ID }} + GOOGLE_SECRET: ${{ secrets.GOOGLE_SECRET }} + - name: Build project run: npm run build env: @@ -36,7 +48,6 @@ jobs: NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }} - # Optionally upload build artifacts if needed - name: Upload build artifacts (optional) if: always() uses: actions/upload-artifact@v3