From cbfdedc3290200fbdcb8fed1f28e24973329ef5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Wed, 26 Jun 2013 13:30:55 +0200 Subject: [PATCH] Added makefile target to update gh-pages branch --- docs/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/Makefile b/docs/Makefile index c5761c499..4a2a7c997 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -128,3 +128,12 @@ doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." + +gh-pages: html + GH_PAGES_CLONE="`mktemp -d`" && \ + git clone --branch gh-pages `git rev-parse --show-toplevel` $$GH_PAGES_CLONE && \ + (cd $$GH_PAGES_CLONE && git rm -r *) && \ + cp -r _build/html/* $$GH_PAGES_CLONE && \ + (cd $$GH_PAGES_CLONE && git add -A && git commit -m 'Updated gh-pages' && git push) && \ + rm -rf $$GH_PAGES_CLONE +