Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ docs.helm.sh/

# JetBrains IDEs (GoLand, IntelliJ, ...) config folder
.idea

scripts/update-docs/.tmp.docs
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "helm"]
path = scripts/update-docs/helm
url = https://github.com/helm/helm
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,7 @@ For earlier versions, see the dev-v2 branch of the main Helm repo [here](https:/

The documentation for the list of Helm CLI Commands are [exported](https://github.com/helm/helm/blob/a6b2c9e2126753f6f94df231e89b2153c2862764/cmd/helm/root.go#L169) from the main helm project repo and rendered [here on the website](https://helm.sh/docs/helm) as a reference.

To update these docs, you'll need to:

1. Go to the `helm/helm` repo and fetch the latest master.
2. Run `helm docs --type markdown` to generate the markdown docs files
3. Copy the generated files (helm.md, helm_create.md, etc)
4. Return to the `helm/helm-www` repo and navigate to `content/en/docs/helm/`
5. Paste the latest CLI command docs here, replacing any prior markdown files
6. Commit the changes and create a PR to update the website.
To update these docs simply run `yarn update-docs`.


### How to Write a Blog Post
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
"last 2 versions",
"Firefox ESR",
"not dead"
]
],
"scripts": {
"update-docs": "./scripts/update-docs/update-docs.sh"
}
}
1 change: 1 addition & 0 deletions scripts/update-docs/helm
Submodule helm added at 7ce29e
24 changes: 24 additions & 0 deletions scripts/update-docs/update-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Abort if anything messes up, namely to avoid `git reset --hard` in our working repo
# or `rsync --delete`ing valid doc templates
set -e

# Init submodules
git submodule update --init --recursive

pushd scripts/update-docs/

# Ensure we've created our temp doc directory, but don't fail if we have already
mkdir .tmp.docs || :

# Make sure the submodule is pointing at master; note this may introduce pending changes
pushd helm
git fetch
git reset --hard origin/master
helm docs --type=markdown --dir ../.tmp.docs
popd
rsync --recursive --delete ./.tmp.docs/ ../../content/en/docs/helm/
popd

echo Docs updated.