From 5cdec98bf03d9cb24cd170e3ae1ae78772960e11 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Thu, 18 Mar 2021 19:59:40 +0100 Subject: [PATCH] add cloud front cache invalidation. --- .drone.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a7f1808..b02bd69 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,6 +48,9 @@ steps: from_secret: aws_region S3_WEBUI_BUCKET: from_secret: s3_webui_bucket + CF_DISTRIBUTION_ID: + from_secret: cf_distribution_id commands: - cd __sapper__/export - - aws s3 sync . s3://$S3_WEBUI_BUCKET + - aws s3 sync --delete . s3://$S3_WEBUI_BUCKET + - aws cloudfront create-invalidation --distribution-id $CF_DISTRIBUTION_ID --paths "/*"