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

gh-pages overwrites the CNAME #503

Closed
njmulsqb opened this issue Jul 25, 2023 · 2 comments · Fixed by #533
Closed

gh-pages overwrites the CNAME #503

njmulsqb opened this issue Jul 25, 2023 · 2 comments · Fixed by #533

Comments

@njmulsqb
Copy link

Hi,

Whenever I publish the site, it overwrites the CNAME from the gh-pages branch, also it is not taking into account CNAME from the branch I am deploying, so with each deploy I have to manually add the CNAME which is time taking

@70nyIT
Copy link

70nyIT commented Aug 6, 2023

same issue here - need to manually re-deploy CNAME file

@jamescourson
Copy link

jamescourson commented Oct 12, 2023

This is the intended functionality - the output of your build step is copied into your build directory, which will overwrite any file inside of it (not just CNAME). I encountered the same issue and found this section of the readme useful.

I ended up adding an extra step to my predeploy script in package.json, writing the file after the build step and before deployment:
"predeploy": "yarn run build && echo your.website > dist/CNAME"

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

Successfully merging a pull request may close this issue.

3 participants