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

Deploy to github pages #218

Closed
nbrohee opened this issue Aug 2, 2016 · 3 comments
Closed

Deploy to github pages #218

nbrohee opened this issue Aug 2, 2016 · 3 comments

Comments

@nbrohee
Copy link

nbrohee commented Aug 2, 2016

Rather than deploying to a cloud vendor website, I tried to deploy to github pages.
Here are my changes to do so with a live version accessible here
I had to remove the publicPath in webpack.config.prod.js as github pages serves the site in a subdomain.

Almost everything works as intended except for the rooting (I think) behaving weirdly.
As you can see here :

  • the app lands on the 404 page instead of the default one
  • navigation replaces the subdomain instead of appending the route path to it.

I know React-slingshot is meant to be served from the website root but any help would be appreciated.

Could be a similar issue to #214

@kwelch
Copy link
Collaborator

kwelch commented Aug 2, 2016

The 404 page is due to gh-pages not the slingshot. See facebook/create-react-app#162 (comment) for notes on SPA in GitHub pages. This also causes issues with browserHistory from react-router which we have enable by default.

@nbrohee
Copy link
Author

nbrohee commented Aug 2, 2016

Thanks you for your quick answer !
Your link pointed me in the right direction to spa-github-pages repository.
Everything is explained in his readme usage section.

@nbrohee nbrohee closed this as completed Aug 2, 2016
@coryhouse
Copy link
Owner

Thanks for the help on this @kwelch ! 👍

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

No branches or pull requests

3 participants