Permalink
Browse files

Added build-github script from Zamboni to push docs to gh-pages autom…

…agically.
  • Loading branch information...
fwenzel committed Jan 20, 2011
1 parent caf520b commit 4438eb2b4cbf5abd578a032b33e13bbb82c51026
Showing with 39 additions and 1 deletion.
  1. +30 −0 build-github.zsh
  2. +9 −1 docs.rst
View
@@ -0,0 +1,30 @@
+#!/bin/zsh
+
+# Should be run from the docs directory: (cd docs && ./build-github.zsh)
+
+REPO=$(dirname $(pwd))
+GH=_gh-pages
+
+
+# Checkout the gh-pages branch, if necessary.
+if [[ ! -d $GH ]]; then
+ git clone $REPO $GH
+ pushd $GH
+ git checkout -b gh-pages origin/gh-pages
+ popd
+fi
+
+# Update and clean out the _gh-pages target dir.
+pushd $GH && git pull && rm -rf * && popd
+
+# Make a clean build.
+make clean dirhtml
+
+# Move the fresh build over.
+cp -r _build/dirhtml/* $GH
+cd $GH
+
+# Commit.
+git add .
+git commit -am "gh-pages build on $(date)"
+git push origin gh-pages
View
@@ -70,4 +70,12 @@ Here's a nice macro for creating headings::
Compiling Documentation
-----------------------
-Playdoh hosts its documentation on github pages.
+Playdoh hosts its documentation on `github pages
+<http://mozilla.github.com/playdoh/>`_. When you change the docs, make sure
+they still build properly and look all right locally::
+
+ cd docs && make html && open _build/html/index.html
+
+If they do, run a build and push it to gh-pages::
+
+ ./build-github.zsh

0 comments on commit 4438eb2

Please sign in to comment.