Skip to content

Commit 2c726a0

Browse files
committed
πŸš€ Deploy via GitHub Actions
1 parent 591d5c9 commit 2c726a0

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: deploy-dev
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
name: Deploy
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20.11.1'
22+
23+
- name: Build & Export
24+
env:
25+
VITE_API_BASE_URL: ${{ secrets.DEV_API_BASE_URL }}
26+
VITE_GOOGLE_CLIENT_ID: ${{ secrets.DEV_GOOGLE_CLIENT_ID }}
27+
VITE_REDIRECT_URI: ${{ secrets.DEV_REDIRECT_URI }}
28+
run: |
29+
yarn install
30+
yarn build
31+
32+
- name: Deploy to S3 and Invalidate Cloudfront
33+
env:
34+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
35+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
36+
AWS_REGION: ap-northeast-2
37+
run: |
38+
aws s3 sync ./dist s3://waffle-team4-web-temp --delete
39+
aws cloudfront create-invalidation --distribution-id E2HDLBJVBNM8HH --paths "/*"

0 commit comments

Comments
Β (0)