-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) ยท 1.49 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
name: Frontend Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
checks: write
pull-requests: write
steps:
- name: Repository ์ฒดํฌ์์
uses: actions/checkout@v3
- name: Node ์ค์
uses: actions/setup-node@v3
with:
node-version: '18.16.1'
- name: node_modules ์บ์ฑ
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: ์์กด์ฑ ์ค์น
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --pure-lockfile
- name: .env ํ์ผ ์์ฑ
run: |
echo "CHANNEL_TALK_KEY=${{ secrets.CHANNEL_TALK_KEY }}" > .env
echo "GOOGLE_ANALYTICS_ID=${{ secrets.GOOGLE_ANALYTICS_ID }}" >> .env
- name: ํด๋ผ์ด์ธํธ ๋น๋
run: yarn build
- name: AWS CLI ์ค์
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2
- name: S3 ์ด์ ํ์ผ ์ญ์
run: |
aws s3 rm ${{ secrets.AWS_S3_URL }} --recursive
- name: S3์ ๋ฐฐํฌ
run: |
aws s3 sync ./dist ${{ secrets.AWS_S3_URL }}