Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions .github/workflows/update-cli-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update CLI Reference Docs
name: Update Reference Docs

on:
workflow_dispatch:
Expand All @@ -14,7 +14,7 @@ permissions:
pull-requests: write

jobs:
update-cli-docs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Determine CLI tag
Expand Down Expand Up @@ -57,13 +57,32 @@ jobs:
- name: Update CLI navigation in docs.json
run: python scripts/update-cli-nav.py --docs-dir client_reference/ --config docs.json

- name: Checkout CLI repo at tag (sparse)
uses: actions/checkout@v4
with:
repository: kosli-dev/cli
ref: refs/tags/${{ steps.tag.outputs.cli_tag }}
sparse-checkout: charts/k8s-reporter
path: cli-repo

- name: Install helm-docs
run: |
curl -sL https://github.com/norwoodj/helm-docs/releases/download/v1.14.2/helm-docs_1.14.2_linux_amd64.deb --output helm-docs.deb
sudo dpkg -i helm-docs.deb
rm helm-docs.deb

- name: Generate helm docs
run: |
cd $GITHUB_WORKSPACE/cli-repo/charts/k8s-reporter
helm-docs --template-files README.md.gotmpl,_templates.gotmpl --output-file $GITHUB_WORKSPACE/helm/k8s_reporter.md

- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
commit-message: "docs: update CLI reference for ${{ steps.tag.outputs.cli_tag }}"
title: "docs: update CLI reference for ${{ steps.tag.outputs.cli_tag }}"
commit-message: "docs: update CLI and helm reference for ${{ steps.tag.outputs.cli_tag }}"
title: "docs: update CLI and helm reference for ${{ steps.tag.outputs.cli_tag }}"
body: |
Automated update of CLI reference documentation for release `${{ steps.tag.outputs.cli_tag }}`.
branch: cli-docs/${{ steps.tag.outputs.cli_tag }}
Automated update of CLI and Helm reference documentation for release `${{ steps.tag.outputs.cli_tag }}`.
branch: reference-docs/${{ steps.tag.outputs.cli_tag }}
delete-branch: true
sign-commits: true
10 changes: 10 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,16 @@
}
]
},
{
"item": "Helm Reference",
"icon": "helm",
"groups": [
{
"group": "Helm Charts",
"pages": ["helm/k8s_reporter"]
}
]
},
{
"item": "API Reference",
"icon": "code",
Expand Down
Loading