-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.29 KB
/
Copy path_deploy.yml
File metadata and controls
50 lines (43 loc) · 1.29 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
name: _deploy
on:
workflow_call:
inputs:
bucket_name:
required: true
type: string
distribution_id:
required: true
type: string
ga_measurement_id:
required: true
type: string
social_login_base_url:
required: true
type: string
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24.12.0'
- name: Install dependencies
run: yarn install
- name: Build & Export
run: yarn build
env:
VITE_GA_MEASUREMENT_ID: ${{ inputs.ga_measurement_id }}
VITE_API_URL: ${{ vars.VITE_API_URL }}
VITE_SOCIAL_LOGIN_BASE_URL: ${{ inputs.social_login_base_url }}
- name: Deploy to S3 and Invalidate Cloudfront
env:
AWS_ACCESS_KEY_ID: ${{ secrets.WAFFLE_CICD_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.WAFFLE_CICD_SECRET_ACCESS_KEY }}
AWS_REGION: ap-northeast-2
run: |
aws s3 sync ./dist s3://${{ inputs.bucket_name }} --delete
aws cloudfront create-invalidation --distribution-id ${{ inputs.distribution_id }} --paths "/*"