-
Notifications
You must be signed in to change notification settings - Fork 12
61 lines (56 loc) · 1.87 KB
/
production.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
name: MiniHackthon Production CI/CD
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
environment: Production
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- name: yarn install
run: yarn install
- name: yarn build
env:
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_AUTH_DOMAIN: ${{ secrets.REACT_APP_AUTH_DOMAIN }}
REACT_APP_PROJECT_ID: ${{ secrets.REACT_APP_PROJECT_ID }}
REACT_APP_STORAGE_BUCKET: ${{ secrets.REACT_APP_STORAGE_BUCKET }}
REACT_APP_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_MESSAGING_SENDER_ID }}
REACT_APP_APP_ID: ${{ secrets.REACT_APP_APP_ID }}
REACT_APP_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
REACT_APP_EMAIL_ENDPOINT: ${{ secrets.REACT_APP_EMAIL_ENDPOINT }}
REACT_APP_SHARE_ENDPOINT: ${{ secrets.REACT_APP_SHARE_ENDPOINT }}
run: yarn build
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: build
path: build
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: build
path: build
- name: GitHub Action for Firebase
uses: w9jds/[email protected]
with:
args: deploy --only hosting --project production
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}