I have a react app deployed with git hub pages, using gh-pages plugin. My package.json entry look like this.
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build”,
.....
}
Eveything worked fine until I tried to use a custom domain.
I configured the required A and CNAME entry in my domain provider DNS settings.
I created the
CNAMEfile in thedevelopbranch. That is the branch that I have checked out on my local machine.I run
npm run deployon develop branch on local machine.plugin pushed the build code to
gh-pagesbranch on remote.the
gh-pagesbranch on remote does not contain theCNAMEfile.after every
deployI have to manually add the custom-domain from github settings pages section, which eventually create aCNAMEfile. And then every works.
Is there a configuration requied in package.json to force gh-pages plugin to copy the CNAME file ?