-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.42 KB
/
deploy_firebase.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
name: Build and Deploy to Firebase
on: [push]
jobs:
buildAndDeploy:
name: Build
runs-on: ubuntu-latest
env:
CI: false
REACT_APP_FIREBASE_KEY: ${{ secrets.FIREBASE_KEY }}
REACT_APP_FIREBASE_DOMAIN: ${{ secrets.FIREBASE_DOMAIN }}
REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
REACT_APP_FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }}
REACT_APP_FIREBASE_SENDER_ID: ${{ secrets.FIREBASE_SENDER_ID }}
REACT_APP_FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
REACT_APP_FIREBASE_MEASUREMENT_ID: ${{ secrets.FIREBASE_MEASUREMENT_ID }}
REACT_APP_APITOKEN: ${{secrets.APITOKEN}}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install and build
run: |
yarn install --frozen-lockfile
yarn build
- name: Install (Functions)
working-directory: functions
run: |
yarn install --frozen-lockfile
- name: Copy index.html
run: |
mkdir -p functions/source
cp build/index.html functions/source/index.html
- name: Deploy to Firebase
uses: w9jds/[email protected]
with:
args: deploy --only hosting,functions
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}