-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.32 KB
/
idle_frontend_workflows.yml
File metadata and controls
58 lines (48 loc) · 1.32 KB
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: CD Idle Frontend
on:
workflow_dispatch:
push:
branches:
- main
paths: 'frontend/Idle/**'
jobs:
build:
runs-on: ubuntu-latest
env:
VITE_kAKAO_MAP_KEY: ${{ secrets.VITE_KAKAO_MAP_KEY }}
defaults:
run:
working-directory: ./frontend/Idle
steps:
- name: Checkout source code.
uses: actions/checkout@v3
- name: Check Node v
run: node -v
- name: Setting env
run: |
echo "VITE_KAKAO_MAP_KEY=$VITE_KAKAO_MAP_KEY" >> .env
env:
VITE_KAKAO_MAP_KEY: ${{ secrets.VITE_KAKAO_MAP_KEY }}
- name: Install dependencies
run: npm ci
- name: Generate build
run: npm run build --if-present
- uses: actions/upload-artifact@v3
with:
name: frontend-artifact
path: frontend/Idle/dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: frontend-artifact
- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY_ID }}
run: |
aws s3 sync \
. s3://${{ secrets.AWS_S3_BUCKET_NAME }} \
--region ap-northeast-2 \