Skip to content

Commit

Permalink
Update deploy-firebase.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sirishgf authored Nov 6, 2023
1 parent b035e62 commit 22af661
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/deploy-firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
build_and_deploy:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -19,20 +20,26 @@ jobs:
working-directory: .
run: npm install

- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}

- name: Deploy function to Firebase
id: initial-deploy-step
continue-on-error: true
run: npx firebase-tools deploy --only functions:updateDashboard --project ${{ secrets.FIREBASE_PROJECT }}
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }}

- name: Deploy function to Firebase
id: retry-deploy-step

if: steps.initial-deploy-step.outcome == 'failure'
run: npx firebase-tools deploy --only functions:updateDashboard --project ${{ secrets.FIREBASE_PROJECT }} --debug
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }}



0 comments on commit 22af661

Please sign in to comment.