Skip to content

Commit

Permalink
purge CDN cache on deploy (#2526)
Browse files Browse the repository at this point in the history
* purge CDN cache on deploy

issues a purge all to the Fastly service that fronts peps.python.org to make new changes appear fast..... lier.

* yaml?
  • Loading branch information
ewdurbin authored Apr 14, 2022
1 parent a6a7eb3 commit d85b9f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ jobs:
branch: gh-pages # The branch to deploy to.
folder: build # Synchronise with build.py -> build_directory
single-commit: true # Delete existing files

- name: ♻️ Purge CDN cache
if: github.ref == 'refs/heads/main'
run: |
curl -H "Accept: application/json" -H "Fastly-Key: $FASTLY_TOKEN" -X POST "https://api.fastly.com/service/$FASTLY_SERVICE_ID/purge_all"
env:
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}

0 comments on commit d85b9f6

Please sign in to comment.