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:
parent
a6a7eb3e07
commit
d85b9f6be5
|
@ -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 }}
|
||||
|
|
Loading…
Reference in New Issue