Skip to content

Commit

Permalink
Update Firebase deployment workflows for service account and add PR h…
Browse files Browse the repository at this point in the history
…osting deployment
  • Loading branch information
sillyangel committed Nov 19, 2024
1 parent 5be5ab2 commit 84f2604
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_OFFBRANDSPOTIFYDB }}
projectId: offbrandspotifydb
7 changes: 1 addition & 6 deletions .github/workflows/firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,10 @@ jobs:
- name: Install Firebase CLI
run: npm install -g firebase-tools

- name: Set up Firebase service account
run: |
echo "${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}" > "${HOME}/firebase-service-account.json"
shell: bash

- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PLAYMUSICHTML }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_OFFBRANDSPOTIFYDB }}
channelId: live
projectId: playmusichtml

0 comments on commit 84f2604

Please sign in to comment.