buildthedocs / btd

A multi-version Sphinx building tool based on containers
https://buildthedocs.github.io/btd/
Apache License 2.0
12 stars 2 forks source link

Support for CNAME settings #6

Open akire0ne opened 3 years ago

akire0ne commented 3 years ago

Hi,

I use buildthedocs inside a Github Action workflow buildthedocs is overwriting my custom domain name in GitHub pages every time the docs is built. There is no obvious way on how to achieve this and it would be nice to have some guidance to do that.

Thanks.

akire0ne commented 3 years ago

I fixed it myself by appending this to my Sphynx conf.py file:

# Include CNAME file so GitHub Pages can set Custom Domain name
html_extra_path = ['CNAME']

CNAME must be put at the root directory of your docs and must contain your custom domain name you want to use in GitHub Pages

your.custom.domain.com

Would be nice if you share such info in your docs, I believe setting a custom domain name in GitHub pages is rather common use case/

eine commented 3 years ago

@achillemyette1 thanks for explaining your solution. In fact, BTD just builds the project with the makefile and configuration provided by the user, and then pushes the result to the repo/branch. Therefore, there should be no difference between using BTD or running sphinx and pushing manually. Did you do it manually first and the behaviour of BTD changed? Or did you try with BTD straightaway?

Would be nice if you share such info in your docs, I believe setting a custom domain name in GitHub pages is rather common use case/

It would interesting indeed. The sources of the docs are located in https://github.com/buildthedocs/btd/tree/master/doc. Up to submitting a PR?