Skip to content

Commit ad7a808

Browse files
committed
chore: purge jsDelivr cache
1 parent 35c4441 commit ad7a808

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/actions/purge-jsdelivr/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
echo "Purging jsDelivr cache for ${{ inputs.package }}"
1919
DELAY=${{ inputs.delay-ms }}
2020
21-
find dist -type f | while read file; do
21+
find dist -type f ! -name "*.map" | while read file; do
2222
PURGE_URL="https://purge.jsdelivr.net/npm/${{ inputs.package }}/$file"
2323
echo "Purging: $PURGE_URL"
2424
curl --retry 3 --retry-delay 2 --fail -s "$PURGE_URL"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 🧹 Purge jsDelivr Cache
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
package:
7+
description: 'Package name and version (e.g. cloudinary-video-player, [email protected], or cloudinary-video-player@edge)'
8+
required: true
9+
default: 'cloudinary-video-player'
10+
type: string
11+
12+
jobs:
13+
purge-cache:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20.x'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build distribution files
29+
run: npm run build-all
30+
31+
- name: Purge jsDelivr Cache
32+
uses: ./.github/actions/purge-jsdelivr
33+
with:
34+
package: ${{ github.event.inputs.package }}
35+
36+
- name: Summary
37+
run: |
38+
echo "### ✅ jsDelivr Cache Purge Complete" >> $GITHUB_STEP_SUMMARY
39+
echo "Package: \`${{ github.event.inputs.package }}\`" >> $GITHUB_STEP_SUMMARY
40+
echo "Files purged from jsDelivr CDN cache (excluding .map files)" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)