Skip to content

Merge pull request #448 from ubc-biztech/other-checkbox #24

Merge pull request #448 from ubc-biztech/other-checkbox

Merge pull request #448 from ubc-biztech/other-checkbox #24

# 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