clean doc folder before building, fixes #4405 (#4406)

This commit is contained in:
Maximilian Hils 2021-01-22 01:40:08 +01:00 committed by GitHub
parent 4be69a5fc7
commit ea624ae6e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -15,5 +15,6 @@ for script in scripts/*.py ; do
"${script}" > "${output}"
done
rm -rf ./public
cd src
hugo

View File

@ -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

View File

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