-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) ยท 1022 Bytes
/
deploy-client.yml
File metadata and controls
39 lines (33 loc) ยท 1022 Bytes
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
name: deploy-client
on:
push:
branches:
- main
workflow_dispatch:
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: '20.11.1'
- name: Build & Export
env:
VITE_API_BASE_URL: ${{ secrets.VITE_API_BASE_URL }}
VITE_GOOGLE_CLIENT_ID: ${{ secrets.VITE_GOOGLE_CLIENT_ID }}
VITE_REDIRECT_URI: ${{ secrets.VITE_REDIRECT_URI }}
run: |
yarn install
yarn build
- name: Deploy to S3 and Invalidate Cloudfront
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ap-northeast-2
run: |
aws s3 sync ./dist s3://waffle-team4-web-dev --delete
aws cloudfront create-invalidation --distribution-id E2ZFV2EEJPTCSU --paths "/*"