From 3bcbe6eb8802488257417d1ee1a99f63e725100a Mon Sep 17 00:00:00 2001 From: Shiv Shankar Singh Date: Thu, 29 Feb 2024 19:58:12 +0530 Subject: [PATCH] Update firebase-hosting-pull-request.yml --- .../workflows/firebase-hosting-pull-request.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index d90e917e..ae4b5c52 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -1,13 +1,10 @@ # This file was auto-generated by the Firebase CLI # https://github.com/firebase/firebase-tools -name: Deploy to Firebase Hosting on merge -'on': - push: - branches: - - main +name: Deploy to Firebase Hosting on PR +'on': pull_request jobs: - build_and_deploy: + build_and_preview: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -17,11 +14,14 @@ jobs: - name: Build run: npm run build working-directory: ./aiden_frontend - - uses: FirebaseExtended/action-hosting-deploy@v0 + - name: Deploy to Firebase Hosting + uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_AIDEN_SHIV }}' projectId: aiden-shiv - # Ensure this step understands it's operating from the root of the aiden_frontend directory + env: + # Ensure the Firebase CLI uses the correct project directory + FIREBASE_CLI_PREVIEWS: hostingchannels working-directory: ./aiden_frontend