Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 32 lines (24 sloc) 661 Bytes
DIR=$(dirname "$0")
cd $DIR
echo "Starting publication to github from ${DIR}"
if [[ $(git status -s) ]]
echo "The working directory is dirty. Please commit any pending changes."
exit 1;
# echo "Deleting old publication"
# rm -rf public
# mkdir public
# git worktree prune
# rm -rf .git/worktrees/public/
# echo "Checking out gh-pages branch into public"
# git worktree add -B gh-pages public origin/gh-pages
echo "Removing existing files"
rm -rf public/*
echo "Generating site"
cp CNAME public/
echo "Updating gh-pages branch"
cd public && git add --all && git commit -m "Publishing to gh-pages (" && git push