Skip to content

Commit ec9c5b0

Browse files
committed
ci: big ⚠️ to ensure the CNAME file is always there
1 parent 5fab767 commit ec9c5b0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: .github/workflows/contrib.yml

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
# Generate HTML for link redirections.
4444
python3 "$GENERATE_PY"
4545
git add *.html
46+
# WARN: The CNAME file is for GitHub to redirect requests to the custom domain.
47+
# Missing this may entail security hazard and domain takeover.
48+
# See <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#securing-your-custom-domain>
4649
git add CNAME
4750
4851
git commit -m "Deploy $GITHUB_SHA to gh-pages"

Diff for: ci/generate.py

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def main():
3939
mapped = "https://doc.rust-lang.org/cargo/reference/{}".format(name)
4040
f.write(TEMPLATE.format(name=name, mapped=mapped))
4141

42+
# WARN: The CNAME file is for GitHub to redirect requests to the custom domain.
43+
# Missing this may entail security hazard and domain takeover.
44+
# See <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#securing-your-custom-domain>
4245
with open('CNAME', 'w') as f:
4346
f.write('doc.crates.io')
4447

0 commit comments

Comments
 (0)