Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2f4759a

Browse files
authoredAug 5, 2024··
Use cURL
1 parent 5df14be commit 2f4759a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎.github/workflows/deploy-staging.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ jobs:
8282
- name: Sync PDF
8383
run: aws s3 sync --cache-control "public, max-age=86400, must-revalidate" --include "*.pdf" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --exclude="*.css" --exclude="*.html" --exclude="*.json" --exclude="sw.json" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
8484

85-
- name: Invalidate cloudflare cache
86-
uses: nathanvaughn/actions-cloudflare-purge@master
87-
with:
88-
cf_zone: ${{ secrets.CLOUDFLARE_ZONE }}
89-
cf_auth: ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}
85+
- name: Purge cache on CloudFlare
86+
run: |
87+
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
88+
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}" \
89+
-H "Content-Type: application/json" \
90+
--data '{"prefixes":["${{ vars.DATASHEETS_BASE_URL }}"]}'

0 commit comments

Comments
 (0)
Please sign in to comment.