mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user