File tree Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Original file line number Diff line number Diff line change 19
19
- name : Check Wrangler Version
20
20
run : wrangler --version
21
21
22
- - name : Verify Secrets
23
- run : |
24
- if [ -z "${{ secrets.CLOUDFLARE_API_TOKEN }}" ]; then
25
- echo "Error: CLOUDFLARE_API_TOKEN is not set."
26
- exit 1
27
- fi
28
- if [ -z "${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" ]; then
29
- echo "Error: CLOUDFLARE_ACCOUNT_ID is not set."
30
- exit 1
31
- fi
32
-
33
- - name : Upload Worker Version
34
- uses : cloudflare/wrangler-action@v3
35
- with :
36
- apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
37
- accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
38
- command : versions upload
22
+ - name : Deploy Worker
39
23
env :
40
- DEBUG : wrangler*
41
-
42
- - name : Handle Missing Worker
43
- if : failure()
44
- run : |
45
- echo "Worker not found or upload failed. Creating and publishing a new Worker."
46
- npx wrangler publish
24
+ CF_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
25
+ run : wrangler deploy
You can’t perform that action at this time.
0 commit comments