Skip to content

fixup! Add a GitHub workflow cache to manually purge the Cloudflare c… #2

fixup! Add a GitHub workflow cache to manually purge the Cloudflare c…

fixup! Add a GitHub workflow cache to manually purge the Cloudflare c… #2

Workflow file for this run

name: Purge Cloudflare Cache
on:
workflow_dispatch:
push:
jobs:
purge-cache:
concurrency:
group: "purge-cache"
cancel-in-progress: false
runs-on: ubuntu-latest
steps:
- name: Purge Cloudflare cache
shell: bash
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
if: env.CLOUDFLARE_TOKEN != ''
run: |
curl "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE/purge_cache" \
-H "Authorization: Bearer $CLOUDFLARE_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "purge_everything": true }'