Skip to content

Commit 8ac8a76

Browse files
Merge pull request #53 from wafflestudio/dev
Release: 와플 인프라 CICD 연결
2 parents 26bf955 + 4372c73 commit 8ac8a76

15 files changed

Lines changed: 3160 additions & 121 deletions

File tree

.github/workflows/_deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: _deploy
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
distribution_id:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
deploy:
12+
name: Deploy
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '24.12.0'
23+
24+
- name: Install dependencies
25+
run: yarn install
26+
27+
- name: Build & Export
28+
run: yarn build
29+
env:
30+
VITE_API_URL: ${{ vars.VITE_API_URL }}
31+
VITE_KAKAO_REDIRECT_URI: ${{ vars.VITE_KAKAO_REDIRECT_URI }}
32+
VITE_GOOGLE_REDIRECT_URI: ${{ vars.VITE_GOOGLE_REDIRECT_URI }}
33+
VITE_NAVER_REDIRECT_URI: ${{ vars.VITE_NAVER_REDIRECT_URI }}
34+
VITE_KAKAO_REST_API_KEY: ${{ secrets.VITE_KAKAO_REST_API_KEY }}
35+
VITE_GOOGLE_CLIENT_ID: ${{ secrets.VITE_GOOGLE_CLIENT_ID }}
36+
VITE_NAVER_CLIENT_ID: ${{ secrets.VITE_NAVER_CLIENT_ID }}
37+
VITE_REST_REQUEST_URL: ${{ secrets.VITE_REST_REQUEST_URL }}
38+
39+
- name: Deploy to S3 and Invalidate Cloudfront
40+
env:
41+
AWS_ACCESS_KEY_ID: ${{ secrets.WAFFLE_CICD_ACCESS_KEY_ID }}
42+
AWS_SECRET_ACCESS_KEY: ${{ secrets.WAFFLE_CICD_SECRET_ACCESS_KEY }}
43+
AWS_REGION: ap-northeast-2
44+
run: |
45+
aws s3 sync ./dist s3://hangsha-web-dev --delete
46+
aws cloudfront create-invalidation --distribution-id ${{ inputs.distribution_id }} --paths "/*"

.github/workflows/deploy-dev.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: deploy-dev
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
uses: ./.github/workflows/_deploy.yml
12+
with:
13+
distribution_id: E3FWQLYH2W4XLU
14+
secrets: inherit

.github/workflows/deploy-prod.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: deploy-prod
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
uses: ./.github/workflows/_deploy.yml
12+
with:
13+
distribution_id: E1UQAE6HOA8O14
14+
secrets: inherit

0 commit comments

Comments
 (0)