From 1af6508414818f113d994e59485744f685032f1f Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Tue, 26 Jun 2012 22:02:10 +0200 Subject: [PATCH] Automate updating gh-pages --- doc/Makefile | 11 ++++++++++- doc/update-gh-pages.sh | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 doc/update-gh-pages.sh diff --git a/doc/Makefile b/doc/Makefile index 478fe5c..44a9b9a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -14,7 +14,9 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp \ + qthelp devhelp epub latex latexpdf text man changes linkcheck \ + doctest gettext update-gh-pages push-gh-pages help: @echo "Please use \`make ' where is one of" @@ -151,3 +153,10 @@ doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." + +update-gh-pages: clean html + @echo "Update gh-pages" + ./update-gh-pages.sh + +push-gh-pages: + cd build/html && git push origin gh-pages diff --git a/doc/update-gh-pages.sh b/doc/update-gh-pages.sh new file mode 100755 index 0000000..00d5045 --- /dev/null +++ b/doc/update-gh-pages.sh @@ -0,0 +1,8 @@ +#!/bin/bash +cd build/html/ +git add . +if [ -n "$(git ls-files --deleted)" ] +then + git ls-files --deleted | xargs git rm +fi +git commit -m "Update"