You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Firebase Deployment
v2.2.2
A GitHub Action to deploy firebase hosting and functions together.
- Make sure you have the
firebase.json
file in the root repository, or set a custom path to look for it using theconfig
input. - Set the project name in the
project
input. - Get a Service Account in JSON format by following the Google Cloud's Getting started guide. Stringify the JSON content and store it as the
GOOGLE_APPLICATION_CREDENTIALS
secret in your repository. - DEPRECATED: We will remove this authentication method when the Firebase CLI no longer supports it. Get the Firebase token by running
firebase login:ci
and store it as theFIREBASE_TOKEN
secret.
name: Deploy to Firebase
on:
push:
branches:
- main
jobs:
main:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Deploy to Firebase
uses: sws2apps/firebase-deployment@main #consider using pin for dependabot auto update
with:
config: 'frontend/firebase.json' #optional
function: true #optional & boolean
hosting: true #optional & boolean
project: 'my-firebase-project' #required
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
#FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} (this will be removed)