Deploying a webpack project to GitHub Pages
- Make sure
dist
is not in your .gitignore
file
$ gulp webpack:build
$ git add dist
$ git commit -m "Deploy to gh-pages"
$ if [ -n "$(git ls-remote origin gh-pages)" ]; then; git push origin :gh-pages; fi
$ git subtree push --prefix=dist origin gh-pages
If you are using the Cordova plugin
- Make sure
www
is not in your .gitignore
file
$ gulp webpack:build
$ git add www
$ git commit -m "Deploy to gh-pages"
$ if [ -n "$(git ls-remote origin gh-pages)" ]; then; git push origin :gh-pages; fi
$ git subtree push --prefix=www origin gh-pages