🔥 GitHub Action to deploy a static site to Firebase Hosting
MIT License
** Note:** To use this action, you must have access to the GitHub Actions feature. GitHub Actions are currently only available in public beta. You can apply for the GitHub Actions beta here.
This simple action uses the vanilla Firebase CLI to run firebase deploy
to upload a static site to Firebase Hosting.
workflow.yml
ExampleThis example checks out your repository and runs firebase deploy
on the root of it. Assuming you have a firebase.json
file there, everything is taken care of automatically except your Firebase/Google Cloud API Token, which should be declared as a secret environment variable named FIREBASE_TOKEN
. Obtain a token by running firebase login:ci
on your local command line.
If you don't have a firebase.json
file, you also need to specify a FIREBASE_PROJECT_ID
environment variable with your Firebase project's unique ID.
You can add add optional firebase deploy
flags by using with: args:
under this step.
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: jakejarvis/firebase-deploy-action@master
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
This project is distributed under the MIT license.