purge CDN cache on deploy (#2526)

* 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?
This commit is contained in:
Ee Durbin 2022-04-14 13:36:47 -04:00 committed by GitHub
parent a6a7eb3e07
commit d85b9f6be5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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 }}