generated from nim-od/softeer-mono-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (57 loc) · 1.9 KB
/
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
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
62
63
64
65
66
67
68
69
70
name: React build
on:
push:
branches:
- deploy
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Clean Yarn cache
run: yarn cache clean
- name: Install Dependencies
run: yarn install --no-immutable
- name: Create .env in user package
run: |
echo "${{ secrets.USER_ENV }}" > packages/user/.env
- name: Create .env in admin package
run: |
echo "${{ secrets.ADMIN_ENV }}" > packages/admin/.env
- name: Build Common
run: yarn run build:common
- name: Build Admin
run: yarn run build:admin
- name: Build User
run: yarn run build:user
- name: Clear Admin S3 Bucket
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 rm s3://yangbong-admin --recursive --region ap-northeast-2
- name: Deploy-Admin
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 cp \
--recursive \
--region ap-northeast-2 \
packages/admin/dist s3://yangbong-admin
- name: Clear User S3 Bucket
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 rm s3://yangbong-front --recursive --region ap-northeast-2
- name: Deploy-User
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 cp \
--recursive \
--region ap-northeast-2 \
packages/user/dist s3://yangbong-front