add docs* targets to Makefile
Signed-off-by: martin f. krafft <madduck@madduck.net>
diff --git a/Makefile b/Makefile
index c04b663..1b01e24 100644
--- a/Makefile
+++ b/Makefile
@@ -31,3 +31,16 @@
docs:
$(MAKE) -C doc man html
+
+docspub: BRANCH=gh-pages
+docspub: HTMLDIR=doc/build/html
+docspub: docs
+ git checkout $(BRANCH)
+ git rm -rf . || :
+ echo '/doc/build/html/.buildinfo' > .gitignore
+ git add $(HTMLDIR) .gitignore
+ git mv $(HTMLDIR)/* .
+ if git commit -m'Webpage update' -s; then \
+ git push $(shell git config --get branch.$(BRANCH).remote) $(BRANCH); \
+ fi
+ git checkout '@{-1}'