-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (31 loc) · 1009 Bytes
/
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
name: front deploy # Workflow 이름
on: # Event 감지
push:
branches:
- main
paths:
- "front/**"
jobs: # Job 설정
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./front
steps:
- name: Checkout source code. # Repo checkout
uses: actions/checkout@v3
- name: Check Node v # Node v 확인
run: node -v
- name: Install dependencies # 의존 파일 설치
run: yarn install --frozen-lockfile
- name: Set environment variables # 환경 변수 설정
run: |
echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" >> $GITHUB_ENV
- name: Generate build # React Build
run: yarn build
- name: Deploy # Upload build file to S3
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 dist s3://moduzzi.site