Last active
May 30, 2016 18:02
-
-
Save tompave/b542565fedd4e928e6edeb63cb089ec2 to your computer and use it in GitHub Desktop.
Build a Middleman site and commit it to an orphan master branch, see the related blog post for the setup: http://tommaso.pavese.me/2016/05/22/how-to-deploy-a-middleman-website-to-github-pages/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
middleman build && | |
echo "--- middleman build complete" | |
git checkout master && | |
echo "--- cleaning old build" | |
(ls -1 | grep -v 'build' | xargs rm -rf ) && | |
echo "--- copying new build to the root level" | |
cp -R build/* ./ && | |
rm -rf build && | |
echo "--- committing" | |
git add . && | |
git commit --message "Automated commit at $(date +"%Y-%m-%d %H:%M:%S %Z")" && | |
echo "--- done" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment