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')