From 4136656adbca1d1b094a094248f81468d1ab6518 Mon Sep 17 00:00:00 2001 From: Ian Maddaus Date: Tue, 26 Mar 2024 12:26:39 -0400 Subject: [PATCH] Update Netlify deploy commands Signed-off-by: Ian Maddaus --- docs-chef-io/.gitignore | 5 +++-- docs-chef-io/Makefile | 25 ++++++++----------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/docs-chef-io/.gitignore b/docs-chef-io/.gitignore index 52e5ef494..22a8f647f 100644 --- a/docs-chef-io/.gitignore +++ b/docs-chef-io/.gitignore @@ -1,5 +1,6 @@ -*.*~ -*~ + +/public +/resources chef-web-docs/ .hugo_build.lock diff --git a/docs-chef-io/Makefile b/docs-chef-io/Makefile index d7f17e5ea..f21dd1ce0 100644 --- a/docs-chef-io/Makefile +++ b/docs-chef-io/Makefile @@ -3,23 +3,16 @@ SHELL=bash preview_netlify: chef_web_docs - rm -rf chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io/content/inspec/resources/* - rm -rf chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io/layouts/* - cp -R ./content/inspec/resources/* ./chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io/content/inspec/resources/ - cp -R layouts/* chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io/layouts/ - cp -R ./config.toml ./chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io/ - cp -R assets/release-notes/inspec-azure/release-dates.json chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io/assets/release-notes/inspec-azure - pushd chef-web-docs && make bundle; hugo --gc --minify --buildFuture --environment preview && popd - - -replace = "replacements = \'github.com/inspec/inspec-azure/docs-chef-io -\> ../../\'\\n\\n" + rm -rf chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io/* + cp -R content chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io + cp -R layouts chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io + cp -R config.toml ./chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io/config.toml + cp -R assets chef-web-docs/_vendor/github.com/inspec/inspec-azure/docs-chef-io + pushd chef-web-docs && bash ./scripts/netlify-deploy-preview.sh && popd serve: chef_web_docs - @echo -e "$(replace)" > temp.txt - @cat chef-web-docs/config/_default/module.toml >> temp.txt - @cat temp.txt > chef-web-docs/config/_default/module.toml - rm temp.txt - pushd chef-web-docs && make bundle; hugo server --buildDrafts --buildFuture --noHTTPCache && popd + printf "go 1.22\n\nuse .\nuse ../" > chef-web-docs/hugo.work + pushd chef-web-docs && make bundle && HUGO_MODULE_WORKSPACE=hugo.work hugo server --buildDrafts --buildFuture --noHTTPCache --ignoreVendorPaths "github.com/inspec/inspec-azure/docs-chef-io" && popd chef_web_docs: if [ -d "chef-web-docs/" ]; then \ @@ -37,7 +30,5 @@ clean: lint: hugo -D - publish_release_notes: $(shell . tools/release-notes/publish-release-notes.sh) -