Skip to content

Commit d85b9f6

Browse files
authored
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?
1 parent a6a7eb3 commit d85b9f6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/render.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,11 @@ jobs:
3939
branch: gh-pages # The branch to deploy to.
4040
folder: build # Synchronise with build.py -> build_directory
4141
single-commit: true # Delete existing files
42+
43+
- name: ♻️ Purge CDN cache
44+
if: github.ref == 'refs/heads/main'
45+
run: |
46+
curl -H "Accept: application/json" -H "Fastly-Key: $FASTLY_TOKEN" -X POST "https://api.fastly.com/service/$FASTLY_SERVICE_ID/purge_all"
47+
env:
48+
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
49+
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}

0 commit comments

Comments
 (0)