Skip to content

Purge CF Cache

Purge CF Cache #332

Workflow file for this run

name: Purge CF Cache
on:
deployment_status:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
purge_cache:
name: Purge CF Cache
runs-on: ubuntu-latest
if: ${{ github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'Production' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Call CF
run: |
curl -X POST https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE_ID }}/purge_cache \
-d '{"purge_everything":true}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.CF_AUTH_KEY }}" \