From 3cda202d01403105ad1c0f5f9133f9364f32a3b7 Mon Sep 17 00:00:00 2001 From: Chris Coley <chris@codingallnight.com> Date: Sun, 30 Apr 2023 05:51:03 -0700 Subject: [PATCH] Delay the Cloudflare cache purge so that pages:deploy is finished My tests indicate that the pages:deploy job typically takes 50-60 seconds to complete, so I'm delaying the cache purge for 180 seconds --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 537482f..ed066fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,6 +84,7 @@ purge-cache: for f in $(find public -type f); do FILES="$FILES,\"$CI_PAGES_URL/${f#public/}\""; done; FILES="$FILES] }" - echo $FILES + - sleep 180s # Give pages:deploy time to finish so the old pages don't get re-cached - >- wget -qO- "https://api.cloudflare.com/client/v4/zones/$CF_PURGE_CACHE_ZONE/purge_cache" --header "Content-Type: application/json" -- GitLab