- Build the app:
cd example
# Remove existing build files to make sure we are not pushing unnecessary files
rm -rf dist
npm run build
cd ..
- Switch to gh-pages branch:
git checkout gh-pages
- Copy new build files to root:
cp -R example/dist/* .
- Add changed page files, remove old files:
git add index.html index.xxx.js index.xxx.js.map
git rm index.yyy.js index.yyy.js.map
- Commit and push:
git commit -m "Deploy example app to GitHub Pages"
git push origin gh-pages
- Switch back to main branch:
git checkout main