-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 983 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: deploy
on:
push:
branches: ['deploy']
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install
- name: Generate Environment Variables File for Production
env:
API_BASE_URL: ${{ secrets.API_BASE_URL }}
KAKAO_DEV_APP_KEY: ${{ secrets.KAKAO_DEV_APP_KEY }}
run: |
echo "VITE_API_BASE_URL=$API_BASE_URL" >> .env.production
echo "VITE_KAKAO_DEV_APP_KEY=$KAKAO_DEV_APP_KEY" >> .env.production
- name: Build
run: yarn build
- name: Sync S3 bucket
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: aws s3 sync --region us-east-1 ./dist s3://todays-lunch --delete