Skip to content

Commit bcd5fff

Browse files
Create deploy.yml
1 parent e7b4bbc commit bcd5fff

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 to Cloudflare Workers
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
name: Deploy
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build project
26+
run: npm run build
27+
28+
- name: Deploy to Cloudflare Workers
29+
uses: cloudflare/wrangler-action@v3
30+
with:
31+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
32+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

0 commit comments

Comments
 (0)