Skip to content

Commit

Permalink
Update Netlify deploy
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
  • Loading branch information
IanMadd committed Mar 26, 2024
1 parent dd9ab4d commit 2a75d22
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 8 deletions.
6 changes: 6 additions & 0 deletions components/docs-chef-io/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
*.*~
*~

resources/
public/

chef-web-docs/
.hugo_build.lock
*.work
*.work.sum
16 changes: 9 additions & 7 deletions components/docs-chef-io/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
SHELL=bash

preview_netlify: chef_web_docs
cp -R content/* chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io/content
cp -R static/* chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io/static
cp -R config.toml chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io/
pushd chef-web-docs && make bundle; hugo --gc --minify --buildFuture && popd
rm -rf chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io/*
cp -R content chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io
cp -R static chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io
cp -R config.toml chef-web-docs/_vendor/github.com/habitat-sh/habitat/components/docs-chef-io
pushd chef-web-docs && bash ./scripts/netlify-deploy-preview.sh && popd

serve: chef_web_docs
echo "replace github.com/habitat-sh/habitat/components/docs-chef-io => ../" >> chef-web-docs/go.mod
pushd chef-web-docs && make bundle; hugo server --buildDrafts --buildFuture --noHTTPCache --ignoreVendorPaths "github.com/habitat-sh/habitat/**" && 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/habitat-sh/habitat/components/docs-chef-io" && popd

chef_web_docs:
if [ -d "chef-web-docs/" ]; then \
Expand All @@ -20,7 +21,8 @@ chef_web_docs:
fi

clean_all:
pushd chef-web-docs && make clean_all && popd
rm -rf chef-web-docs
hugo mod clean

lint: assets
hugo -D
50 changes: 50 additions & 0 deletions components/docs-chef-io/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
// Version of the setting file. Always 0.1
"version": "0.2",
// language - current active spelling language
"language": "en_US",
"dictionaries": [
"chef",
"docs"
],
"dictionaryDefinitions": [
{
"name": "chef",
"path": "https://raw.githubusercontent.com/chef/chef_dictionary/main/chef.txt",
"description": "Custom Chef Dictionary"
},
{
"name": "docs",
"path": "https://raw.githubusercontent.com/chef/chef_dictionary/main/docs.txt",
"description": "Custom Docs Dictionary"
}
],
// words - list of words to be always considered correct
// "words": [
// ],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": [
"hte"
],
"ignorePaths": [
"**/*.yml",
"**/*.toml",
"**/*.svg",
"archetypes/*.md",
"_vendor/**/*",
"cspell.json",
"public/**",
"chef-web-docs",
"resources/**"
],
"ignoreRegExpList": [
"/'s\\b/",
"/'d\\b/",
"/^\\s*```[\\s\\S]*?^\\s*```/gm",
"{{(.+)(?=}})"
],
"words": [
]
}
2 changes: 1 addition & 1 deletion components/docs-chef-io/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/habitat-sh/habitat/components/docs-chef-io

go 1.14
go 1.22

0 comments on commit 2a75d22

Please sign in to comment.