Skip to content

Instantly share code, notes, and snippets.

@jasonrhodes
Created December 11, 2012 14:15
Show Gist options
  • Save jasonrhodes/4258869 to your computer and use it in GitHub Desktop.
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
#!/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