Skip to content

Instantly share code, notes, and snippets.

@wb14123
Created January 31, 2013 12:27
Show Gist options
  • Save wb14123/4682524 to your computer and use it in GitHub Desktop.
Save wb14123/4682524 to your computer and use it in GitHub Desktop.
Update my jekyll blog to github and github page.
#!/bin/bash
BASE_DIR=`pwd`
J_DIR="./jekyll"
GIT_DIR="./wb14123.github.com"
cd $J_DIR
jekyll
cd $BASE_DIR
rm -r $GIT_DIR/*
cp -r $J_DIR/_site/* $GIT_DIR/
cd $GIT_DIR
git add -A .
git commit -m "Changed at $(date)"
git push origin master
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment