diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 790b568..bd0be9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,3 +32,8 @@ jobs: projectName: start-ubuntu-mate-org directory: _site gitHubToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Purge Cloudflare Cache + if: ${{ github.event_name == 'push' && github.repository == 'ubuntu-mate/start.ubuntu-mate.org' && github.ref == 'refs/heads/master' }} + run: | + curl -X POST https://api.cloudflare.com/client/v4/zones/${{secrets.CLOUDFLARE_ZONE_ID}}/purge_cache -H "Authorization: Bearer ${{secrets.CLOUDFLARE_API_TOKEN}}" -H "Content-Type: application/json" --data '{"purge_everything":true}'