aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f54f275
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+DOCS_WORKTREE := /tmp/fastcgi-conduit-docs
+
+
+.PHONY: docs
+docs: target/doc/* \
+ $(DOCS_WORKTREE) \
+ $(DOCS_WORKTREE)/* \
+ $(DOCS_WORKTREE)/index.html
+ git -C $(DOCS_WORKTREE) add .
+ git -C $(DOCS_WORKTREE) commit
+
+target/doc/*:
+ cargo doc --no-deps
+
+$(DOCS_WORKTREE):
+ git worktree add $(DOCS_WORKTREE) gh-pages
+
+$(DOCS_WORKTREE)/*:
+ cp -R target/doc/* $(DOCS_WORKTREE)/
+
+$(DOCS_WORKTREE)/index.html:
+ cp doc/index.html $(DOCS_WORKTREE)/
+
+.PHONY: docs-clean
+docs-clean:
+ git worktree remove --force $(DOCS_WORKTREE)