-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.52 KB
/
client-pr.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
name: Pull Request 🛠️
on:
pull_request:
paths:
- 'client/**'
- '.github/**'
jobs:
testAndDeployClient:
runs-on: ubuntu-latest
env:
working-directory: ./client
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ~/.yarn
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Install Dependencies
run: yarn
working-directory: ${{ env.working-directory }}
- name: Build Website
run: yarn build
working-directory: ${{ env.working-directory }}
env:
REACT_APP_REGION: us-west-1
REACT_APP_API_URL: lwbao86kml
REACT_APP_API_STAGE: beta
REACT_APP_COGNITO_USERPOOL_ID: us-west-1_YqFXItxNG
REACT_APP_COGNITO_APPCLIENT_ID: 2jfr5crb2smk47k480unvd1rem
REACT_APP_COGNITO_IDENTITYPOOL_ID: us-west-1:ace65909-a8da-405b-83b6-5362c269fba5
- name: Run Unit Tests
run: yarn test
working-directory: ${{ env.working-directory }}
- uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
args: deploy --dir=client/build
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'