diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1605171..eafb614 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: diff --git a/Makefile b/Makefile index d9b3b4b..dbd8a83 100644 --- a/Makefile +++ b/Makefile @@ -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)