Skip to content

Commit

Permalink
feat: add check-update-docs scripts (#92)
Browse files Browse the repository at this point in the history
* feat: add check-update-docs scripts

* chore: run policy

* refactor: check docs

* test: check docs

* test: check docs
  • Loading branch information
daviderli614 authored Dec 22, 2023
1 parent 1d18aec commit 8be3618
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
with:
fetch-depth: 0

- name: Check docs
run: |
make check-docs
- name: Install Helm
uses: azure/setup-helm@v3
with:
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ endif
install-helm-docs: ## Install helm-docs tool
go install github.com/norwoodj/helm-docs/cmd/helm-docs@${HELM_DOCS_VERSION}

.PHONY: update-docs
update-docs: install-helm-docs ## Run helm-docs
.PHONY: docs
docs: install-helm-docs ## Run helm-docs
$(GOBIN)/helm-docs -c charts/greptimedb-cluster --chart-search-root=charts/greptimedb-cluster --template-files=README.md.gotmpl
$(GOBIN)/helm-docs -c charts/greptimedb-operator --chart-search-root=charts/greptimedb-operator --template-files=README.md.gotmpl
$(GOBIN)/helm-docs -c charts/greptimedb-standalone --chart-search-root=charts/greptimedb-standalone --template-files=README.md.gotmpl

.PHONY: check-docs
check-docs: docs ## Check docs
@git diff --quiet || \
(echo "Need to update documentation, please run 'make docs'"; \
exit 1)

0 comments on commit 8be3618

Please sign in to comment.