-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
33 lines (29 loc) · 1.48 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.PHONY: docs clean help
docs: clean
@echo "Processing README.md files from examples/gke, examples/cloud-run, and examples/vertex-ai..."
@mkdir -p docs/source/examples
@echo "Converting Jupyter Notebooks to MDX..."
@doc-builder notebook-to-mdx examples/vertex-ai/notebooks/
@echo "Auto-generating example files for documentation..."
@python docs/scripts/auto-generate-examples.py
@echo "Cleaning up generated Markdown Notebook files..."
@find examples/vertex-ai/notebooks -name "vertex-notebook.md" -type f -delete
@echo "Generating YAML tree structure and appending to _toctree.yml..."
@python docs/scripts/auto-update-toctree.py
@echo "YAML tree structure appended to docs/source/_toctree.yml"
@echo "Documentation setup complete."
clean:
@echo "Cleaning up generated documentation..."
@rm -rf docs/source/examples
@awk '/^# GENERATED CONTENT DO NOT EDIT!/,/^# END GENERATED CONTENT/{next} {print}' docs/source/_toctree.yml > docs/source/_toctree.yml.tmp && mv docs/source/_toctree.yml.tmp docs/source/_toctree.yml
@echo "Cleaning up generated Markdown Notebook files (if any)..."
@find examples/vertex-ai/notebooks -name "vertex-notebook.md" -type f -delete
@echo "Cleanup complete."
serve:
@echo "Serving documentation via doc-builder"
doc-builder preview gcloud docs/source --not_python_module
help:
@echo "Usage:"
@echo " make docs - Auto-generate the examples for the docs"
@echo " make clean - Remove the auto-generated docs"
@echo " make help - Display this help message"