From b91dbdaa8f22462c6a7a065ff2ebd2cee52094f8 Mon Sep 17 00:00:00 2001 From: antelle Date: Sun, 7 Jun 2020 12:32:22 +0200 Subject: [PATCH] purging cloudflare cache after publishing a release --- .github/workflows/build.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c1397ab0..f1e69a67 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -534,3 +534,11 @@ jobs: - name: Sync the website if: ${{ github.repository == 'keeweb/keeweb' }} run: gsutil -m rsync -r -d -x "^\." gh-pages gs://app.keeweb.info/ + - name: Purge CloudFlare cache + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + run: | + curl -sS -X POST "https://api.cloudflare.com/client/v4/zones/dbda8e7e454d23edb08d4bc3b3f6f872/purge_cache" \ + -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ + -H "Content-Type: application/json" \ + --data '{"purge_everything":true}'