A better solution may be deployment via GitHub Actions, but I stumbled upon a working solution someone else may find helpful. It modifies the shell script found in the documentation a bit to use a workspace to support history
- Vite Static Deployment Documentation 📑
- Inspiration 💡
(run once before deploy.sh script)
# Checkout a new, clean slate 'gh-pages' branch (this shouldn't already exist)
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Initial commit"
git checkout main