Reputation: 558
App works perfectly fine when it's deployed on https://github.io/architect_portfolio
(when custom domain is not set). When it's deployed to https://architect.mszanowski.pl
, all I can see is a blank white page.
What can I do to make it working? I think it has something to do with architect_portfolio
part in assets urls.
To deploy it on custom domain I did following:
mszan.github.io.
record to my architect.mszanowski.pl
subdomain,package.json
homepage
and name
values: "homepage": "https://architect.mszanowski.pl",
"name": "architect_portfolio",
gh-pages -d build
Repo: https://github.com/mszan/architect_portfolio
Another repo of working React app deployed on custom domain which is working fine: https://github.com/mszan/aestral_portfolio
Upvotes: 1
Views: 916
Reputation: 986
Your second repo that works fine have CNAME file in gh-pages branch which contains the custom domain who github reads for custom domains mapping. While the repo that does not work in your case don't have this file in your gh-pages branch.
Solution:
Add CNAME file to /public dir
For details please consult getting-a-custom-domain-to-behave-with-react-on-github-pages.
Upvotes: 2