Skip to content

Instantly share code, notes, and snippets.

View iamjohnmills's full-sized avatar

John Mills iamjohnmills

View GitHub Profile

How to host your stand-alone built React source files on Github Pages

New: git checkout -b public -> remove dist from .gitignore -> add github base url to build configs -> npm run build -> git add/merge -> git commit -> git subtree push --prefix dist origin public

Edit: git checkout public -> git merge master -> npm run build -> git add/merge -> git subtree push --prefix dist origin public

On Github -> Set github page branch to public

Source: https://gist.github.com/cobyism/4730490