build: add separate docs build and preview targets
This adds two new make target for building and previewing the current state of the documentation locally. Signed-off-by: Alexander Trost <galexrt@googlemail.com>
This commit is contained in:
2 files changed
+13
-2
No files matched your search
@@ -190,11 +190,17 @@ crds: $(CONTROLLER_GEN) $(YQ)
|
||||
@echo Updating CRD manifests
|
||||
@build/crds/build-crds.sh $(CONTROLLER_GEN) $(YQ)
|
||||
|
||||
gen-rbac: $(HELM) $(YQ) ## generate RBAC from Helm charts
|
||||
gen-rbac: $(HELM) $(YQ) ## Generate RBAC from Helm charts
|
||||
@# output only stdout to the file; stderr for debugging should keep going to stderr
|
||||
HELM=$(HELM) ./build/rbac/gen-common.sh
|
||||
HELM=$(HELM) ./build/rbac/gen-nfs-rbac.sh
|
||||
|
||||
docs-preview: ## Preview the documentation through mkdocs
|
||||
mkdocs serve
|
||||
|
||||
docs-build: ## Build the documentation to the `site/` directory
|
||||
mkdocs build --strict
|
||||
|
||||
.PHONY: all build.common
|
||||
.PHONY: build build.all install test check vet fmt codegen mod.check clean distclean prune
|
||||
|
||||
|
||||
@@ -131,9 +131,14 @@ endif
|
||||
|
||||
# ====================================================================================
|
||||
# docs
|
||||
build.docs:
|
||||
|
||||
deps.docs:
|
||||
pip3 install -r requirements_docs.txt
|
||||
|
||||
build.docs: deps.docs
|
||||
# Build the docs once before they are published to ensure they are correctly building
|
||||
mkdocs build --strict
|
||||
|
||||
publish.docs:
|
||||
if ! git remote show docs > /dev/null 2>&1; then git remote add docs $(DOCS_GIT_REPO); fi
|
||||
# If we are running in GitHub actions, remove the extraheader so our custom GitHub API token is used
|
||||
|
||||
Reference in new issue
Block a user