Skip to content

Commit cfcc0a4

Browse files
authored
Merge pull request #2106 from arduino/use-curl
Use CURL to purge Cloudflare assets in production, too
2 parents efbc5c9 + c9805c6 commit cfcc0a4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/deploy-production.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,9 +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.PRODUCTION_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 }}
90-
prefixes: https://docs.arduino.cc/resources/datasheets/
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)