Deploy security rules #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
- master | |
#TODO: remove | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopend | |
jobs: | |
rules_deploy: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./firebase | |
GOOGLE_APPLICATION_CREDENTIALS: /opt/gcp_key.json | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Export service account credentials to file | |
run: echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POOLSCORE_1973 }}' > '${{ env.GOOGLE_APPLICATION_CREDENTIALS }}' | |
- run: npm run deploy | |
working-directory: ${{ env.working-directory }} | |
functions_deploy: | |
needs: rules_deploy | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./functions | |
GOOGLE_APPLICATION_CREDENTIALS: /opt/gcp_key.json | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Export service account credentials to file | |
run: echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POOLSCORE_1973 }}' > '${{ env.GOOGLE_APPLICATION_CREDENTIALS }}' | |
- run: npm ci && npm run build | |
working-directory: ${{ env.working-directory }} | |
- run: npm run deploy | |
working-directory: ${{ env.working-directory }} | |
client_deploy: | |
needs: [rules_deploy, functions_deploy] | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./client | |
steps: | |
- uses: actions/checkout@v3 | |
- run: npm ci && npm run build | |
working-directory: ${{env.working-directory}} | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POOLSCORE_1973 }}' | |
channelId: live | |
projectId: poolscore-1973 | |