1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00
Files
tabler/gh-pages.sh
2018-03-20 15:40:33 +01:00

28 lines
514 B
Bash
Executable File

#!/bin/bash
git checkout master
exists=`git show-ref refs/heads/gh-pages`
if [ -n "$exists" ]; then
git branch -D gh-pages
fi
echo "check out branch gh-pages ..."
git checkout -b gh-pages
echo "add dist folder"
git add -f dist
echo "commit changes"
git commit -m "deploy to gh-pages"
echo "push to remote gh-pages"
git push origin `git subtree split --prefix dist`:gh-pages --force
echo "checkout branch master"
git checkout master
echo "delete branch gh-pages"
git branch -D gh-pages
echo "All done!"