## Setup
$ rm -rf dist
$ echo "dist/" >> .gitignore
$ git checkout -b gh-pages
$ git checkout main
$ git worktree add dist gh-pages # Make sure dist does not exist yet
## Making changes
$ cd dist
$ rm -rf * # Remove all initial files, this command would not delete hidden files
$ make # or what ever you run to populate dist
$ git add --all
$ git commit -m "Deploy $(git log '--format=format:%H' main -1)"
$ git push origin gh-pages
$ cd ..
Last active
February 25, 2023 08:13
-
-
Save xiaohk/bc1adfa16a1d274d62a999b62e26e88f to your computer and use it in GitHub Desktop.
Deploy to gh-pages
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment