Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Netlify deploy #9203

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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