Skip to main content
← Back to workflows

How to Use GitHub Actions for Firebase

w9jds-firebase-action -
GitHub Action
Firebase-Action Release v13.10.0
924
Contributors
Contributor - w9jdsContributor - luc122c
CICUBE ANALYTICS INSIGHTS
Engineering Velocity: 25% Team Time Lost to CI Issues
View Platform →
3.5h
Time Saved/Dev/Week
40%
Faster Releases
Click for next insight
Usage
name: 'Usage of firebase-action GitHub Action'
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

firebase-action logo

Firebase Action

GitHub Action for interacting with Firebase


What is Firebase Action?

This Action for firebase-tools enables arbitrary actions with the Firebase command-line client.

How to Specify Multiple Hosting Environments

To deploy to specific hosting environments, you can use the following configuration:

- name: Deploy to Firebase
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
with:
args: deploy --only hosting:[environment name]

How to Add a Deployment Message

To include a deployment message, such as the Git commit message, use the following configuration:

- name: Deploy to Firebase
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
with:
args: deploy --message \"${{ github.event.head_commit.message }}\"
run: firebase ${{ steps.deploy.outputs.args }}