-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) ยท 1.97 KB
/
inong_fe_with_s3.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
name: deploy to aws s3
# main ๋ธ๋์น์ push ๋ ๋ ํ์ฌ ์คํฌ๋ฆฝํธ ์คํ trigger ๋ฐ๋.
on:
push:
branches:
- develop
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: source code checkout
uses: actions/checkout@v2
- name: setup node.js
uses: actions/setup-node@v2
with:
node-version: "20"
- name: npm install
working-directory: .
# run ์ ์ง์ ์ฌ์ฉํ๊ณ ์ ํ๋ ๋ช
๋ น์ด.
run: npm install
- name: npm build
env:
VUE_APP_API_BASE_URL: ${{ secrets.BASE_URL }}
VUE_APP_MY_URL: ${{ secrets.MY_URL }}
VUE_APP_KAKAO_REDIRECT_URI: ${{ secrets.KAKAO_REDIRECT_URI }}
VUE_APP_KAKAO_CLIENT_ID: ${{ secrets.KAKAO_CLIENT_ID }}
VUE_APP_GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
VUE_APP_GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
VUE_APP_GOOGLE_REDIRECT_URI: ${{ secrets.GOOGLE_REDIRECT_URI}}
VUE_APP_PORTONE_STORE_ID: ${{ secrets.PORTONE_STORE_ID }}
VUE_APP_PORTONE_CHANNEL_KEY: ${{ secrets.PORTONE_CHANNEL_KEY }}
VUE_APP_FIREBASE_VAPID_KEY: ${{ secrets.FIREBASE_VAPID_KEY }}
VUE_APP_FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
working-directory: .
run: npm run build
- name: setup aws cli
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET }}
aws-region: "ap-northeast-2"
# ๊ธฐ์กด ์ง์ฐ๊ณ ๋น๋ ๋ฃ์ด์ฃผ๊ธฐ
- name: clear s3 bucket
run: aws s3 rm s3://www.inong.shop/ --recursive
- name: deploy to s3 bucket
run:
aws s3 cp ./dist s3://www.inong.shop/ --recursive
- name: invalidate cloudfront cache
run:
aws cloudfront create-invalidation --distribution-id E311EUF9PYKNKB --paths "/*"