From 37f73d03adb6b13765413089d9e180c398dbd11c Mon Sep 17 00:00:00 2001 From: Ishan Jain Date: Tue, 21 Jun 2022 18:51:51 +0530 Subject: [PATCH] Updated gh action to only act on the directory --- .github/workflows/synchronize-cdn.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/synchronize-cdn.yml b/.github/workflows/synchronize-cdn.yml index a82d87c..22290a4 100644 --- a/.github/workflows/synchronize-cdn.yml +++ b/.github/workflows/synchronize-cdn.yml @@ -52,10 +52,14 @@ jobs: # remove `.github` and any other paths we do not want in the CDN rm -rf .github .git - # SYNC - rclone sync -P . s3:$CDN_BUCKET/ + # Synchronize the `icons` directory + # Note: This command should be added for any new directories in this repo + # otherwise, they'll not be synced + rclone sync icons s3:$CDN_BUCKET/icons rclone config delete s3 # Wipe out DigitalOcean CDN cache - curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" -d '{"files": ["*"]}' https://api.digitalocean.com/v2/cdn/endpoints/$CDN_ID/cache + # Note: This command should be added for any new directories in this repo + # otherwise, cache for those directories will not be cleared + curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" -d '{"files": ["icons/*"]}' https://api.digitalocean.com/v2/cdn/endpoints/$CDN_ID/cache