Skip to content

Commit 68cf49b

Browse files
committed
updated workflows
1 parent afb72dd commit 68cf49b

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,7 @@ jobs:
1919
- name: Check Wrangler Version
2020
run: wrangler --version
2121

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
3923
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

0 commit comments

Comments
 (0)