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/*"