diff options
Diffstat (limited to 'docs/upload-archive.sh')
-rwxr-xr-x | docs/upload-archive.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/upload-archive.sh b/docs/upload-archive.sh new file mode 100755 index 00000000..e35345e9 --- /dev/null +++ b/docs/upload-archive.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -o errexit +set -o pipefail +set -o nounset +# set -o xtrace + +if [[ $# -eq 0 ]] ; then + echo "Please supply a version, e.g. 'v3'" + exit 1 +fi + +# This script uploads docs to a specified archive version. + +SPATH="/archive/$1" + +aws configure set preview.cloudfront true +aws --profile mitmproxy \ + s3 sync --acl public-read ./public s3://docs.mitmproxy.org$SPATH +aws --profile mitmproxy \ + cloudfront create-invalidation --distribution-id E1TH3USJHFQZ5Q \ + --paths "$SPATH/*" |