Skip to content

Instantly share code, notes, and snippets.

@willwillems
Created February 9, 2021 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willwillems/6ac0e3cd2180dc1ba845efba9bb5be7b to your computer and use it in GitHub Desktop.
Save willwillems/6ac0e3cd2180dc1ba845efba9bb5be7b to your computer and use it in GitHub Desktop.
Deploy Firebase functions with Github Actions
name: Build and Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2.3.4
- name: NPM install with caching (functions)
uses: bahmutov/npm-install@v1.6.0
with:
working-directory: functions
- name: Deploy to Firebase
uses: w9jds/firebase-action@v2.0.0
with:
args: deploy --only functions
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
@willwillems
Copy link
Author

Get the Firebase token with firebase login:ci

Read here how to set this token on Github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment