-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 856 Bytes
/
deploy.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
name: Build-and-Deploy
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Setup Yarn Env
run: yarn
- shell: bash
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
run: |
echo "REACT_APP_GOOGLE_API_KEY=\"$GOOGLE_API_KEY\"" > .env
echo "REACT_APP_GOOGLE_CLIENT_ID=\"$GOOGLE_CLIENT_ID\"" >> .env
- name: Build app
run: yarn build
- name: Unit Test
run: yarn test:ci
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build