aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-07-04 18:18:56 +0200
committerTeddy Wing2020-07-04 18:18:56 +0200
commit839fcbab5a2d437b562903ba636381d5a8eca5d3 (patch)
treef0c30a2c205c41ab072ade55694fa7031f770fa8
parente95475840a10278796ec07ac80572ec7381f83ae (diff)
downloadfastcgi-conduit-839fcbab5a2d437b562903ba636381d5a8eca5d3.tar.bz2
Script to generate docs to a GitHub pages branch
-rw-r--r--Makefile26
-rw-r--r--doc/index.html6
2 files changed, 32 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)
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
index 0000000..cd6fe7e
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,6 @@
+<html>
+<head>
+ <meta http-equiv="refresh" content="0; url=./fastcgi_conduit">
+</head>
+<body></body>
+</html>