Update version #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Purge Cloudflare Cache | |
on: | |
push: | |
branches: | |
- main # Trigger on pushes to the main branch (adjust as needed) | |
jobs: | |
purge_cache: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Purge Cloudflare Cache | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} | |
run: | | |
curl -X POST "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/purge_cache" \ | |
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ | |
-H "Content-Type: application/json" \ | |
--data '{"purge_everything":true}' |