Skip to content

💭 version 🎀 control 🦇 #3

💭 version 🎀 control 🦇

💭 version 🎀 control 🦇 #3

Workflow file for this run

name: Deploy to Firebase Hosting
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- 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
gcloud auth activate-service-account --key-file=firebase-key.json
gcloud config set project $(jq -r '.project_id' firebase-key.json)
firebase deploy --only hosting --token "$(gcloud auth print-access-token)"