Skip to content

[146] Other Checkbox #69

[146] Other Checkbox

[146] Other Checkbox #69

# 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