Files
releases/docs/Makefile
T
Torin Sandall 187bf70d8b 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>
2019-04-08 17:12:45 -07:00

61 lines
1023 B
Makefile

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
load-docs:
scripts/load-docs.sh
setup:
npm install
serve:
ENV=local hugo server \
--buildDrafts \
--buildFuture
docker-serve:
docker run --rm -it \
-v $(PWD):/src \
-p 1313:1313 \
-e ENV=local \
klakegg/hugo:0.53-ext server \
--buildDrafts \
--buildFuture
production-build: clean load-docs
hugo \
--contentDir generated \
--ignoreCache \
--minify
preview-build: clean
ENV=local hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture \
--ignoreCache \
--minify
linkcheck-build:
hugo \
--baseURL "/" \
--buildDrafts \
--buildFuture
linkcheck: clean linkcheck-build
htmlproofer ./public --empty-alt-ignore