Permalink
Browse files

Add website deploy script.

  • Loading branch information...
1 parent b889209 commit 181370661fa5f2af903255870f2b81afb4112f39 @JakeWharton committed Apr 15, 2013
Showing with 35 additions and 0 deletions.
  1. +35 −0 deploy_website.sh
View
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+set -ex
+
+DIR=temp-clone
+
+# Delete any existing temporary website clone
+rm -rf $DIR
+
+# Clone the current repo into temp folder
+git clone git@github.com:JakeWharton/ActionBarSherlock.git $DIR
+
+# Move working directory into temp folder
+cd $DIR
+
+# Checkout and track the gh-pages branch
+git checkout -t origin/gh-pages
+
+# Delete everything
+rm -rf *
+
+# Copy website files from real repo
+cp -R ../website/* .
+
+# Stage all files in git and create a commit
+git add .
+git add -u
+git commit -m "Website at $(date)"
+
+# Push the new files up to GitHub
+git push origin gh-pages
+
+# Delete our temp folder
+cd ..
+rm -rf $DIR

0 comments on commit 1813706

Please sign in to comment.