2020-07-08 00:43:46 +00:00
|
|
|
# we use pushd/popd here, and /bin/sh of our chefes/buildkite image is not bash
|
|
|
|
# so we have to override the default shell here
|
|
|
|
SHELL=bash
|
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
preview_netlify: chef_web_docs
|
2022-03-11 20:47:44 +00:00
|
|
|
rm -rf chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/*
|
|
|
|
cp -R content chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
|
|
|
|
cp -R static chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
|
|
|
|
cp -R layouts chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
|
2021-02-10 20:25:35 +00:00
|
|
|
cp -R config.toml chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
|
2022-03-15 22:29:15 +00:00
|
|
|
pushd chef-web-docs && make bundle; hugo --gc --minify --buildFuture && popd
|
2020-07-08 00:43:46 +00:00
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
serve: chef_web_docs
|
|
|
|
echo "replace github.com/inspec/inspec/docs-chef-io => ../" >> chef-web-docs/go.mod
|
2022-03-15 22:29:15 +00:00
|
|
|
pushd chef-web-docs && make bundle; hugo server --buildDrafts --buildFuture --noHTTPCache && popd
|
2020-07-08 00:43:46 +00:00
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
chef_web_docs:
|
|
|
|
if [ -d "chef-web-docs/" ]; then \
|
2021-09-10 16:52:22 +00:00
|
|
|
pushd chef-web-docs && git reset HEAD --hard; git clean -fd; git pull --ff-only origin main; rm -rf public && popd; \
|
2020-12-11 02:02:52 +00:00
|
|
|
else \
|
|
|
|
git clone https://github.com/chef/chef-web-docs.git; \
|
|
|
|
fi
|
2020-09-14 20:53:40 +00:00
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
clean_all:
|
2021-02-10 20:25:35 +00:00
|
|
|
rm -rf chef-web-docs
|
|
|
|
|
|
|
|
clean:
|
2020-12-11 02:02:52 +00:00
|
|
|
pushd chef-web-docs && make clean_all && popd
|
2020-07-08 00:43:46 +00:00
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
lint:
|
2020-07-08 00:43:46 +00:00
|
|
|
hugo -D
|