diff --git a/.gitignore b/.gitignore index b6f35bb..79d7328 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ _build man/ *.install .merlin +.gh-pages diff --git a/Makefile b/Makefile index 5fb1ec6..f954f49 100644 --- a/Makefile +++ b/Makefile @@ -40,4 +40,20 @@ watch: make all; \ done -.PHONY: benchs tests examples update_next_tag push_doc push_stable watch +REPO=git@github.com:c-cube/iter +DOCDIR=.gh-pages + +$(DOCDIR)/.git: + mkdir -p $(DOCDIR) + cd $(DOCDIR) && (\ + git clone -b gh-pages $(REPO).git . \ + ) + +gh-pages: $(DOCDIR)/.git doc + git -C $(DOCDIR) pull + cp -r _build/default/_doc/_html/* $(DOCDIR)/doc/dev/ + git -C $(DOCDIR) add --all + git -C $(DOCDIR) commit -a -m "gh-page updates" + git -C $(DOCDIR) push origin gh-pages + +.PHONY: benchs tests examples update_next_tag push_doc push_stable watch gh-pages