Skip to content

Commit 8d7703d

Browse files
committed
Add GitHub Actions auto-deploy to Cloudflare Pages
1 parent c2dcce3 commit 8d7703d

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy LinkSim 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+
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: 22
22+
cache: npm
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build
28+
run: npm run build
29+
30+
- name: Deploy to Cloudflare Pages
31+
env:
32+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
33+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
34+
run: npx wrangler pages deploy dist --project-name linksim

0 commit comments

Comments
 (0)