-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.16 KB
/
hosting.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
name: CI
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Override API endpoint.
run: echo "REACT_APP_API_URL=https://gygb-backend-v1-dev.herokuapp.com/v1/" > $GITHUB_WORKSPACE/.env.production.local
- name: NPM Install
run: npm install
- name: NPM Build
run: npm run build
- name: Archive Development Build
uses: actions/upload-artifact@master
with:
name: build-dev
path: build
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: build-dev
path: build/
- name: GitHub Action for Firebase
uses: w9jds/[email protected]
with:
args: deploy --project development --only hosting:web
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}