From e45b6f45e800c8112acd339d389a5320a127def3 Mon Sep 17 00:00:00 2001 From: Nafula Evelyn Ouma <122805658+evie-8@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:11:08 +0300 Subject: [PATCH 1/2] Debugging issue --- .github/workflows/deploy.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 753d0b8..20064e8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,6 +23,13 @@ jobs: - name: Install dependencies run: npm ci + + - name: Debug Environment Variables + run: | + echo "FIREBASE_API_KEY=${{ secrets.FIREBASE_API_KEY }}" + echo "FIREBASE_AUTH_DOMAIN=${{ secrets.FIREBASE_AUTH_DOMAIN }}" + echo "FIREBASE_PROJECT_ID=${{ secrets.FIREBASE_PROJECT_ID }}" + echo "FIREBASE_STORAGE_BUCKET=${{ secrets.FIREBASE_STORAGE_BUCKET }}" - name: Build website env: From 328e044fd1d93dacdbf70e768893c2c77273d7c5 Mon Sep 17 00:00:00 2001 From: evie-8 Date: Fri, 15 Nov 2024 11:19:32 +0300 Subject: [PATCH 2/2] adding environment variables to workflow file --- .github/workflows/deploy.yml | 4 +++- .github/workflows/pre-deploy.yml | 2 ++ src/theme/firebase.ts | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 753d0b8..7459759 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,13 +23,15 @@ jobs: - name: Install dependencies run: npm ci - + - name: Build website env: FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN }} FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }} + FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }} + FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }} run: npm run build - name: Upload Build Artifact diff --git a/.github/workflows/pre-deploy.yml b/.github/workflows/pre-deploy.yml index a50c09b..4d81ef0 100644 --- a/.github/workflows/pre-deploy.yml +++ b/.github/workflows/pre-deploy.yml @@ -30,4 +30,6 @@ jobs: FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN }} FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }} + FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }} + FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }} run: npm run build diff --git a/src/theme/firebase.ts b/src/theme/firebase.ts index 1cfc5e9..afd7f18 100644 --- a/src/theme/firebase.ts +++ b/src/theme/firebase.ts @@ -7,7 +7,9 @@ const app = firebase.initializeApp({ apiKey: process.env.FIREBASE_API_KEY, authDomain: process.env.FIREBASE_AUTH_DOMAIN, projectId: process.env.FIREBASE_PROJECT_ID, - storageBucket: process.env.FIREBASE_STORAGE_BUCKET + storageBucket: process.env.FIREBASE_STORAGE_BUCKET, + messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID, // if you have this + appId: process.env.FIREBASE_APP_ID, }); export const auth = getAuth(app);