1

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.

enter image description here enter image description here

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:

  1. add CNAME mszan.github.io. record to my architect.mszanowski.pl subdomain,
  2. update my package.json homepage and name values:
  "homepage": "https://architect.mszanowski.pl",
  "name": "architect_portfolio",
  1. made a commit to master branch,
  2. run 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

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.