Skip to content

Commit

Permalink
Auto-purge Cloudflare cache so changes show up sooner
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Dec 9, 2024
1 parent 44c35ed commit 861e74e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Purge Cloudflare cache
run: |
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE_ID }}/purge_cache" \
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_TOKEN }}" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'

0 comments on commit 861e74e

Please sign in to comment.