🔀 deplo 📌 yment 🎉 #1
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
name: Deploy to Firebase Hosting | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install Firebase CLI | |
run: npm install -g firebase-tools | |
- name: Deploy to Firebase Hosting | |
env: | |
FIREBASE_SERVICE_ACCOUNT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} | |
run: | | |
echo $FIREBASE_SERVICE_ACCOUNT_KEY > ${GITHUB_WORKSPACE}/firebase-key.json | |
firebase use --add --project $(jq -r '.project_id' firebase-key.json) | |
firebase deploy --only hosting --token "$(firebase auth:import-service-account-credentials firebase-key.json)" |