(path: str, src: Path = root / "docs/public")
| 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...") |
no outgoing calls
no test coverage detected
searching dependent graphs…