Created
December 11, 2012 14:15
-
-
Save jasonrhodes/4258869 to your computer and use it in GitHub Desktop.
Quick script to manage a jekyll site hosted on github, but running plugins locally
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 | |
# Replace 'notrobotic' throughout the script with the name of your blog's directory, and '~/vhosts/notrobotic' with the path to your local repo | |
cd ~/vhosts/notrobotic | |
# git add . | |
# git add -u | |
# git commit -m "My message passed in via param" | |
# git checkout src | |
# git merge master | |
git checkout src | |
jekyll | |
rm -rf ~/tmp/notrobotic | |
mkdir -p ~/tmp/notrobotic | |
cp -R _site ~/tmp/notrobotic/_site | |
git checkout master | |
mv .git ~/tmp/notrobotic/.git | |
mv .gitignore ~/tmp/notrobotic/.gitignore | |
rm -rf ./* | |
mv ~/tmp/notrobotic/.git .git | |
mv ~/tmp/notrobotic/.gitignore .gitignore | |
mv ~/tmp/notrobotic/_site/* . | |
touch .nojekyll | |
git add . | |
git add -u | |
git commit -m "Site updated and generated" | |
git push github master | |
git checkout src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment