Last active
January 24, 2021 19:43
-
-
Save valenso/1451b844d3e28b927f37532482f43308 to your computer and use it in GitHub Desktop.
How to automate Firebase app deployment with GitHub Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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