Skip to content

Commit 59a80f0

Browse files
chore(workflow): verify cf token before purge
1 parent e4f5576 commit 59a80f0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
- name: Purge Cloudflare cache
2929
run: |
3030
echo "Token length: ${#CF_TOKEN}"
31+
echo "Verifying token..."
32+
curl -s "https://api.cloudflare.com/client/v4/user/tokens/verify" \
33+
-H "Authorization: Bearer $CF_TOKEN"
34+
echo ""
35+
echo "Purging cache..."
3136
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE_ID }}/purge_cache" \
3237
-H "Authorization: Bearer $CF_TOKEN" \
3338
-H "Content-Type: application/json" \

0 commit comments

Comments
 (0)