From ec9c5b0b43c6066dd46a3fbfc6e12cc1aee23362 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Wed, 18 Oct 2023 21:21:16 -0400 Subject: [PATCH] =?UTF-8?q?ci:=20big=20=E2=9A=A0=EF=B8=8F=20to=20ensure=20?= =?UTF-8?q?the=20CNAME=20file=20is=20always=20there?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/contrib.yml | 3 +++ ci/generate.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/contrib.yml b/.github/workflows/contrib.yml index 6ab60f96c61..a4c1cb5d0d2 100644 --- a/.github/workflows/contrib.yml +++ b/.github/workflows/contrib.yml @@ -43,6 +43,9 @@ jobs: # Generate HTML for link redirections. python3 "$GENERATE_PY" git add *.html + # WARN: The CNAME file is for GitHub to redirect requests to the custom domain. + # Missing this may entail security hazard and domain takeover. + # See git add CNAME git commit -m "Deploy $GITHUB_SHA to gh-pages" diff --git a/ci/generate.py b/ci/generate.py index 70a7dc1e68d..b750729dc76 100644 --- a/ci/generate.py +++ b/ci/generate.py @@ -39,6 +39,9 @@ def main(): mapped = "https://doc.rust-lang.org/cargo/reference/{}".format(name) f.write(TEMPLATE.format(name=name, mapped=mapped)) + # WARN: The CNAME file is for GitHub to redirect requests to the custom domain. + # Missing this may entail security hazard and domain takeover. + # See with open('CNAME', 'w') as f: f.write('doc.crates.io')