Skip to content

Instantly share code, notes, and snippets.

@dejanr
Last active June 11, 2019 22:52
Show Gist options
  • Save dejanr/9dc624e3a7a45ffd51d45e72ab831a80 to your computer and use it in GitHub Desktop.
Save dejanr/9dc624e3a7a45ffd51d45e72ab831a80 to your computer and use it in GitHub Desktop.
deploy github page
#!/usr/bin/env bash
setup() {
git stash push
git checkout gh-pages
}
cleanup() {
git checkout master
git stash pop
}
setup
trap cleanup EXIT
git fetch origin
git reset --hard origin/gh-pages
git merge --no-edit master
./update.sh
git add .
git commit -m "Regen"
git push origin gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment