From 187bf70d8b2f79ba15eebbab5563ac10a4779265 Mon Sep 17 00:00:00 2001 From: Torin Sandall Date: Mon, 8 Apr 2019 12:00:12 -0700 Subject: [PATCH] Add self-contained static site build target This target is self-contained and produces a site.tar.gz output that contains the entire static site. We can deploy the contents of site.tar.gz to the gh-pages branch. Signed-off-by: Torin Sandall --- docs/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/Makefile b/docs/Makefile index 9dc4d94745..51551891cd 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,3 +1,18 @@ +all: +ifndef VERSION +$(error VERSION is not set) +endif + rm -fr public resources generated node_modules + echo "- $(VERSION)" > data/releases.yaml + mkdir -p generated/docs + cp -r content/docs generated/docs/v$(VERSION) + npm install + hugo \ + --contentDir generated \ + --ignoreCache \ + --minify + tar czvf site.tar.gz -C public . + clean: rm -rf public