Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CNAME auto-generation can break CDN fronted sites #969

Closed
davidski opened this issue Feb 4, 2019 · 2 comments · Fixed by #1240
Closed

CNAME auto-generation can break CDN fronted sites #969

davidski opened this issue Feb 4, 2019 · 2 comments · Fixed by #1240
Labels
deploy ✈️ feature a feature request or enhancement wip work in progress
Milestone

Comments

@davidski
Copy link

davidski commented Feb 4, 2019

The improved build_cname() functionality included with V1.2.0 causes me a bit of grief with my deployment architecture.

I have a GitHub hosted site (davidski.github.io/evaluator) that is fronted by AWS CloudFront at evaluator.severski.net. I need to put https://evaluator.severski.net into my _pkgdown.yml for links to be generated correctly for the canonical form of my site. With this in the URL field, pkgdown generates a CNAME which, if deployed, causes an infinite loop between my CDN and my origin site.

I'm able to work around this by putting the CNAME file into my .gitignore, but I wonder if there isn't a more elegant solution for this.

@hadley hadley added deploy ✈️ feature a feature request or enhancement labels May 17, 2019
@hadley
Copy link
Member

hadley commented Mar 11, 2020

I wonder if build_cname() should be moved out of init_site() and into one of the deploy functions, since it's specifically concerned with deployment via github pages.

@hadley
Copy link
Member

hadley commented Mar 11, 2020

Maybe we should have to deploy_to_github_pages() which would be a thin wrapper around build_cname() + deploy_to_branch()

@hadley hadley added this to the 1.5.0 milestone Mar 11, 2020
hadley added a commit that referenced this issue Mar 12, 2020
@hadley hadley added the wip work in progress label Mar 12, 2020
hadley added a commit that referenced this issue Mar 12, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
* Generates CNAME at deployment (not at build). Fixes  #969.
* Generates `.nojekyll` since this is static size. Fixes #1242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy ✈️ feature a feature request or enhancement wip work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants