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

QUESTION: custom domain deployment #30

Closed
fpigeonjr opened this issue Feb 25, 2017 · 3 comments
Closed

QUESTION: custom domain deployment #30

fpigeonjr opened this issue Feb 25, 2017 · 3 comments

Comments

@fpigeonjr
Copy link

fpigeonjr commented Feb 25, 2017

What is the process for deploying blog on a custom domain?

#gatsbyjs/gatsby#243

I was able to run the yarn run deploy script and push the public directory to the gh-pages branch.

Then I manually created a CNAMEfile with my custom domain.

The issue is every time I run the deploy script it removes the CNAME file.

Is there any way to prevent that?

screen shot 2017-02-25 at 12 22 35 am

@abisz
Copy link
Contributor

abisz commented Feb 25, 2017

Hey @fpigeon :)

you could move the CNAME file to pages, this way it would get automatically copied into the build folder.
Just like it's done here: axelclark/axelclark.com#9

Hope this helps!

@fpigeonjr
Copy link
Author

thanks again @abisz. Yes moving the CNAMEfile to the pages directory works like a charm. This should be in the getting started guide.

Just tested and confirmed by running yarn run deploy and my site was pushed and no need to add the CNAME manually.

Thanks!

@andrewsuzuki
Copy link

Better option is to put it in /static and it'll get copied automatically.

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

No branches or pull requests

3 participants