Navigation Menu

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

Pushing changes to GitHub Pages branch removes custom domain setting #7538

Closed
febbraro opened this issue Mar 29, 2017 · 4 comments
Closed

Pushing changes to GitHub Pages branch removes custom domain setting #7538

febbraro opened this issue Mar 29, 2017 · 4 comments

Comments

@febbraro
Copy link

I have travis building a documentation site with mkdocs and using the deploy provider pages to push to a gh-pages branch in the same repo. Everytime a new build pushes to the repo, the settings for "custom domain" get reset to blank.

I'm happy to look at code and help debug, etc. but I can't figure out where the code is that does it, etc.

@febbraro
Copy link
Author

I am setting the custom domain through the repo settings, not via a CNAME file.

@febbraro
Copy link
Author

Adding a CNAME file fixes this problem. Something to consider though is that GitHub recommends setting it via the Settings page and not via a CNAME file, so this may start to appear more and more.

See the "tip" here: https://help.github.com/articles/troubleshooting-custom-domains/#github-repository-setup-errors

@ghost
Copy link

ghost commented Dec 8, 2017

If you set the fqdn setting for the pages deploy provider, it will create a CNAME automatically. Whatever you put in the CNAME should automatically populate the custom domain setting.

Note that this will remove the need for you to copy the CNAME file to the build directory.

whoisryosuke pushed a commit to whoisryosuke/ryosuke-gatsby-blog that referenced this issue Apr 4, 2018
## v1.0.4 - April 4, 2018

* Fixed header links
* Created `<SEO />` component that wraps React Helmet and accepts blog post data + image to generate a meta tags, Open Graph data, and Twitter tags.
* Added `<SEO />` component to the `blog-post.js` component.
* Added favicons to the root layout file `layouts/index.js`.
* Created a config file with basic site details (`/config/index.js`)
* Created `CNAME` file for Github Pages. Deploying to GP was causing the custom domain to break, adding the CNAME file is apparently the solution [#7538](travis-ci/travis-ci#7538 (comment))
@stale
Copy link

stale bot commented Apr 13, 2018

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@BanzaiMan @febbraro and others