Skip to content

Instantly share code, notes, and snippets.

@shovanch
Created September 29, 2018 18:08
Show Gist options
  • Save shovanch/b4699ed8db7cfc78286ee7b46eb29007 to your computer and use it in GitHub Desktop.
Save shovanch/b4699ed8db7cfc78286ee7b46eb29007 to your computer and use it in GitHub Desktop.
  1. Create a branch name gh-pages
  2. Push it to remote
  3. Run the webpack build command
  4. Now run this command
git subtree push --prefix dist origin gh-pages

This will only push the dist folder to the gh-pages branch Now in the github pages settings change it from 'master' to 'gh-pages' branch Each time, you are done with a feature, run webpack build command and then that git command, your gh-page site will update automatitacally from the updated dist folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment