- Create a branch name gh-pages
- Push it to remote
- Run the webpack build command
- 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