-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (31 loc) · 1.04 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Deploy to Firebase
on:
release:
types: [published]
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@master
- name: Setup Node.js Environment
uses: actions/setup-node@master
with:
node_version: '12.x'
- name: Install Node Dependencies
run: npm run install:ci
- name: Install Firebase CLI
run: npm install -d firebase-tools
- name: Build Project for Production
run: npm run build:prod
- name: Set Firebase Functions Config
run: npx firebase functions:config:set backupserviceaccount.email="$BACKUP_EMAIL" backupserviceaccount.key="$BACKUP_KEY"
env:
BACKUP_EMAIL: ${{ secrets.FIRESTORE_BACKUP_EMAIL }}
BACKUP_KEY: ${{ secrets.FIRESTORE_BACKUP_KEY }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Deploy to Firebase
run: npx firebase deploy --force
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}