To push the contents of your dist folder to gh-pages, use the following steps:
- Make sure your branch to deploy gh-pages from is deleted on the remote. We'll be using the "pages" branch as an example.
git checkout -b pagesto create and checkout the new branch- Edit your
.gitignoreto remove the ignore fordist git add -Ato add all changesgit commityour changesgit subtree push --prefix dist origin pages- this will push the contents ofdistto thepagesbranch, so that it only contains the contents ofdistand nothing else from the repository/parent folders. This means thatindex.htmlwill be at the root of the branch and you can select it to deploy immediately in your repo's options.