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 <torinsandall@gmail.com>
This commit is contained in:
Torin Sandall
2019-04-08 12:00:12 -07:00
parent bff9a2c8ca
commit 187bf70d8b
+15
View File
@@ -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