-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.43 KB
/
build-client.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
name: Build and Deploy Client
on:
push:
branches:
- main
- "releases/**"
jobs:
build-dev:
if: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Make .env
run: |
touch ./.env.local
echo VITE_API_ENDPOINT=${{ vars.PUBLIC_API_ENDPOINT }} >> ./.env.local
- name: Install dependencies
run: yarn
- name: Build
run: yarn build
build-stable:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
PUBLIC_URL: ${{ vars.PUBLIC_URL }}
GENERATE_SOURCEMAP: false
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Make .env
run: |
touch ./.env.local
echo VITE_API_ENDPOINT=${{ vars.PUBLIC_API_ENDPOINT }} >> ./.env.local
- name: Install dependencies
run: yarn
- name: Build
run: yarn build
- name: Deploy
uses: reggionick/s3-deploy@v3
with:
folder: dist
bucket: ${{ vars.S3_BUCKET_PRODUCTION }}
bucket-region: ${{ vars.S3_BUCKET_REGION }}
dist-id: ${{ vars.CLOUDFRONT_DISTRIBUTION_ID_PRODUCTION }}
no-cache: true
private: true