MCPcopy
hub / github.com/mitmproxy/mitmproxy / upload_docs

Function upload_docs

release/deploy.py:76–100  ·  view source on GitHub ↗
(path: str, src: Path = root / "docs/public")

Source from the content-addressed store, hash-verified

74
75 # Upload docs
76 def upload_docs(path: str, src: Path = root / "docs/public"):
77 subprocess.check_call(["aws", "configure", "set", "preview.cloudfront", "true"])
78 subprocess.check_call(
79 [
80 "aws",
81 "s3",
82 "sync",
83 "--delete",
84 "--acl",
85 "public-read",
86 src,
87 f"s3://docs.mitmproxy.org{path}",
88 ]
89 )
90 subprocess.check_call(
91 [
92 "aws",
93 "cloudfront",
94 "create-invalidation",
95 "--distribution-id",
96 "E1TH3USJHFQZ5Q",
97 "--paths",
98 f"{path}/*",
99 ]
100 )
101
102 if branch == "main":
103 print(f"Uploading dev docs...")

Callers 1

deploy.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…