From ea624ae6e32e198b2b91e91c4d97a7536cdec781 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 22 Jan 2021 01:40:08 +0100 Subject: [PATCH] clean doc folder before building, fixes #4405 (#4406) --- docs/build.sh | 1 + docs/ci.sh | 2 +- docs/upload-stable.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/build.sh b/docs/build.sh index 05d5141a8..eaeb87907 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -15,5 +15,6 @@ for script in scripts/*.py ; do "${script}" > "${output}" done +rm -rf ./public cd src hugo diff --git a/docs/ci.sh b/docs/ci.sh index 3e2e9bc76..0d920e090 100755 --- a/docs/ci.sh +++ b/docs/ci.sh @@ -11,7 +11,7 @@ set -o pipefail # Only upload if we have defined credentials - we only have these defined for # trusted commits (i.e. not PRs). if [[ ! -z "${AWS_ACCESS_KEY_ID}" && $GITHUB_REF == "refs/heads/master" ]]; then - aws s3 sync --acl public-read ./public s3://docs.mitmproxy.org/master + aws s3 sync --delete --acl public-read ./public s3://docs.mitmproxy.org/master aws cloudfront create-invalidation --distribution-id E1TH3USJHFQZ5Q \ --paths "/master/*" fi diff --git a/docs/upload-stable.sh b/docs/upload-stable.sh index a2f20f01c..f0f8a664b 100755 --- a/docs/upload-stable.sh +++ b/docs/upload-stable.sh @@ -7,7 +7,7 @@ set -o nounset aws configure set preview.cloudfront true aws --profile mitmproxy \ - s3 sync --acl public-read ./public s3://docs.mitmproxy.org/stable + s3 sync --delete --acl public-read ./public s3://docs.mitmproxy.org/stable aws --profile mitmproxy \ cloudfront create-invalidation --distribution-id E1TH3USJHFQZ5Q \ --paths "/stable/*"