Skip to content

Commit 47913e4

Browse files
committed
CI/CD 추가: main 브랜치에 push 시 Cloudflare Pages로 자동 배포
1 parent c5f106e commit 47913e4

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy to Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
deployments: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build
29+
run: npm run build
30+
31+
- name: Deploy to Cloudflare Pages
32+
uses: cloudflare/wrangler-action@v3
33+
with:
34+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
35+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
36+
command: pages deploy dist --project-name=marketing-settlement

0 commit comments

Comments
 (0)