Managed and deployed using git/GitHub, from 'gh-pages' branch, in order to be able to work alongside a user site.
Checkout the 'main' branch, make changes to it, commit and push the changes, checkout the 'gh-pages' branch, delete it's files before merging the main branch and pushing to the 'gh-pages' branch:
git checkout main
git add .
git commit -m "Updates made"
git push origin main
git checkout gh-pages
rm *.*
git merge main
git push origin gh-pages
See my CodePen.