Skip to content

Commit

Permalink
CI: Add step to purge Cloudflare cache
Browse files Browse the repository at this point in the history
This was previously run as a 'post-deploy-actions.sh' script on the
server via SSH.
  • Loading branch information
lah7 committed Dec 10, 2024
1 parent 98d529b commit 99625f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/publish-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
directory: online/build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Purge Cloudflare Cache
if: ${{ github.event_name == 'push' && github.repository == 'ubuntu-mate/ubuntu-mate-guide' && github.ref == 'refs/heads/master' }}
run: |
curl -X POST --fail-with-body 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}'
test:
name: Proofing
runs-on: ubuntu-latest
Expand Down

0 comments on commit 99625f4

Please sign in to comment.