mirror of
https://github.com/rust-lang/cargo
synced 2024-09-28 20:15:04 +00:00
ci: big ⚠️ to ensure the CNAME file is always there
This commit is contained in:
parent
5fab767241
commit
ec9c5b0b43
3
.github/workflows/contrib.yml
vendored
3
.github/workflows/contrib.yml
vendored
|
@ -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 <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>
|
||||
git add CNAME
|
||||
|
||||
git commit -m "Deploy $GITHUB_SHA to gh-pages"
|
||||
|
|
|
@ -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 <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>
|
||||
with open('CNAME', 'w') as f:
|
||||
f.write('doc.crates.io')
|
||||
|
||||
|
|
Loading…
Reference in a new issue