Skip to content

Deploy Production

Deploy Production #59

name: Deploy Production
on:
push:
branches:
- main
schedule:
- cron: "0 3 5 * *"
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.5
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0
node-version: 14.x # optional
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
npm ci
cd ./functions && npm ci && npm run lint && cd ..
npm run test
npm run build
- name: Deploy
run: |
npm i -g firebase-tools
firebase deploy --token ${{ secrets.FIREBASE_DEPLOY_KEY }} --project prod
# Doesn't support Node 14: https://github.com/w9jds/firebase-action/issues/83
#uses: w9jds/firebase-action@v2.0.0
#with:
# args: deploy --project prod
#env:
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_DEPLOY_KEY }}