Added GitHub Actions workflow for clearing JSdelivr cache

This commit is contained in:
NianBroken
2024-05-07 13:42:43 +08:00 Unverified
parent 3539f92ca7
commit 631e7f0d88
+3 -2
View File
@@ -131,8 +131,9 @@ jobs:
git commit -m "Update from GitHub Actions" || true git commit -m "Update from GitHub Actions" || true
git push origin main --force git push origin main --force
- name: Purge images - name: Purge JSdelivr Cache
run: | run: |
for i in {1..50}; do for i in {1..50}; do
curl -X PURGE "https://purge.jsdelivr.net/gh/NianBroken/ZFCheckScores/img/$i.png" response=$(curl -X POST -H "Content-Type: application/json" -d '{}' "https://purge.jsdelivr.net/gh/NianBroken/ZFCheckScores/img/$i.png")
echo $response
done done