File: ci.sh

package info (click to toggle)
mitmproxy 6.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 37,008 kB
  • sloc: python: 46,207; javascript: 6,250; xml: 189; sh: 138; ansic: 68; sql: 19; makefile: 13
file content (17 lines) | stat: -rwxr-xr-x 534 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash

set -o errexit
set -o pipefail
# set -o xtrace

# This script gets run from CI to render and upload docs for the master branch.

./build.sh

# 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 cloudfront create-invalidation --distribution-id E1TH3USJHFQZ5Q \
        --paths "/master/*"
fi