Skip to content

Instantly share code, notes, and snippets.

@valenso
Last active January 24, 2021 19:43
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 valenso/1451b844d3e28b927f37532482f43308 to your computer and use it in GitHub Desktop.
Save valenso/1451b844d3e28b927f37532482f43308 to your computer and use it in GitHub Desktop.
How to automate Firebase app deployment with GitHub Actions
name: Deploy to Google
# Run this workflow every time a new commit pushed to your repository
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
env:
working-directory: ./functions
strategy:
matrix:
node-version: [10.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install libraries
run: npm install
working-directory: ${{env.working-directory}}
- name: install firebase
run: npm i firebase-tools -g
- name: deploy
run: firebase deploy --token ${{ secrets.GCLOUD_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment