Using https://www.npmjs.com/package/gh-pages was the way to go for me. Saves tons of headaches especially if you're working with others.
If you already have a "gh-pages" branch, use the 1st command below. If you don't have a "gh-pages" branch, initialize it by using the 2nd command below. Make it easier to run by creating scripts like these in your package.json file:
"scripts": {
"gh-deploy": "git push origin :gh-pages && git subtree push --prefix dist origin gh-pages"
"gh-deploy-init": "git push origin && git subtree push --prefix dist origin gh-pages",
}