Skip to content

Commit 04abc0f

Browse files
duremovichclaude
andcommitted
Add GitHub Actions workflow to deploy on push to main
Builds the Astro site and runs `wrangler deploy` on every push to main, replacing the disconnected Cloudflare Git integration. Failures surface in the Actions tab. Requires repo secrets CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6da7ea7 commit 04abc0f

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

‎.github/workflows/deploy.yml‎

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

0 commit comments

Comments
 (0)