npm run dev
To build and publish to github pages:
git commit -m 'commit comment'
git push origin master
git checkout gh-pages
git merge master
Resolve merge conflicts.
Comment out '/public/build/' in .gitignore with '#' and run:
npm run build
git subtree push --prefix public/ origin gh-pages
Do not push gh-pages to origin gh-pages
Origin gh-pages only contains the build files. It is not the same as the local gh-pages branch.
Don't forget to remove uncomment in .gitignore and:
git checkout main