-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 2.42 KB
/
firebase-hosting-pull-request.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
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on PR
'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
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.event.pull_request.base.ref == '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 Preview
if: github.event.pull_request.base.ref == 'dev'
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BT_WEB_DEV_EBF17 }}'
projectId: bt-web-dev-ebf17
- name: Prod Firebase Build
if: github.event.pull_request.base.ref == '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 Preview
if: github.event.pull_request.base.ref == 'master'
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BT_WEB_19A7B }}'
projectId: bt-web-19a7b