-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 964 Bytes
/
Copy pathdeploy.yml
File metadata and controls
34 lines (31 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Deploy this Worker to Cloudflare when you push to main (optional template).
#
# Required GitHub repository secrets:
# CLOUDFLARE_API_TOKEN — API token with Workers Scripts Edit
# CLOUDFLARE_ACCOUNT_ID — Workers dashboard account id
#
# Do not store tokens in this file.
name: deploy
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- run: npm ci
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: deploy
env:
# If you use secrets for ORIGIN_AUTH, set them in the Worker dashboard
# or extend this workflow with: wrangler secret put (interactive only locally).