-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 2.36 KB
/
firebase-hosting-merge.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on merge
'on':
push:
branches: [ dev, master ]
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.13.2'
- name: Dev Firebase Build
if: github.ref == 'refs/heads/dev'
run: npm ci && npm run build
env:
SASS_PATH: './node_modules'
REACT_APP_DEV_API: '${{ secrets.REACT_APP_DEV_API }}'
REACT_APP_STAGING_API: '${{ secrets.REACT_APP_STAGING_API }}'
REACT_APP_SHOW_MAXVP: true
REACT_APP_STAGE: 'development'
REACT_APP_SPREADSHEET_ID: '${{ secrets.REACT_APP_SPREADSHEET_ID }}'
REACT_APP_SHEET_ID: ${{ secrets.REACT_APP_SHEET_ID }}
REACT_APP_CLIENT_EMAIL: '${{ secrets.REACT_APP_CLIENT_EMAIL }}'
REACT_APP_PRIVATE_KEY: '${{ secrets.REACT_APP_PRIVATE_KEY }}'
- name: Dev Firebase Deploy
if: github.ref == 'refs/heads/dev'
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BT_WEB_DEV_EBF17 }}'
channelId: live
projectId: bt-web-dev-ebf17
- name: Prod Firebase Build
if: github.ref == 'refs/heads/master'
run: npm ci && npm run build
env:
SASS_PATH: './node_modules'
REACT_APP_DEV_API: '${{ secrets.REACT_APP_DEV_API }}'
REACT_APP_STAGING_API: '${{ secrets.REACT_APP_STAGING_API }}'
REACT_APP_SHOW_MAXVP: true
REACT_APP_STAGE: 'production'
REACT_APP_SPREADSHEET_ID: '${{ secrets.REACT_APP_SPREADSHEET_ID }}'
REACT_APP_SHEET_ID: ${{ secrets.REACT_APP_SHEET_ID }}
REACT_APP_CLIENT_EMAIL: '${{ secrets.REACT_APP_CLIENT_EMAIL }}'
REACT_APP_PRIVATE_KEY: '${{ secrets.REACT_APP_PRIVATE_KEY }}'
- name: Prod Firebase Deploy
if: github.ref == 'refs/heads/master'
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BT_WEB_19A7B }}'
channelId: live
projectId: bt-web-19a7b