Skip to content

Commit f3f428b

Browse files
authored
feat(ci): add Cloudflare Pages deployment (#7)
1 parent b37013c commit f3f428b

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'website/**'
9+
- '.github/workflows/deploy.yml'
10+
workflow_dispatch:
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: website
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: npm
27+
cache-dependency-path: website/package-lock.json
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Build site
33+
run: npm run build
34+
35+
- name: Deploy to Cloudflare
36+
uses: cloudflare/wrangler-action@v3
37+
with:
38+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
39+
workingDirectory: website
40+
command: deploy

CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,14 @@ website/
100100
GitHub Actions workflows in `.github/workflows/`:
101101

102102
- **build.yml** - Build validation on push/PR
103+
- **deploy.yml** - Deploy to Cloudflare Pages on push to main
103104
- **commit-lint.yml** - Validate PR titles follow conventional commits
104105
- **contributors.yml** - Auto-update contributors in README
106+
107+
## Deployment
108+
109+
The site is deployed to Cloudflare Pages using Wrangler.
110+
111+
- **Configuration:** `website/wrangler.toml`
112+
- **Deploy trigger:** Push to main (changes to `website/**`)
113+
- **Required secret:** `CLOUDFLARE_API_TOKEN`

website/wrangler.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name = "dtvem-io"
2+
compatibility_date = "2024-12-01"
3+
4+
[assets]
5+
directory = "./dist"

0 commit comments

Comments
 (0)