Add command to Make docs - #5008
Draft
JC-wk wants to merge 8 commits into
Draft
Conversation
added 7 commits
July 27, 2026 08:11
…ty Dependabot alerts
…per-linter version
Unit Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 8f5fb8a. ♻️ This comment has been updated with latest results. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a make docs workflow to make it easier for contributors to install documentation dependencies and build/serve the MkDocs site locally, with supporting documentation and changelog updates.
Changes:
- Add
docstarget toMakefilethat delegates to a new helper script. - Add contributor documentation for running MkDocs locally (serve/build/lint).
- Record the new
make docscommand inCHANGELOG.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Makefile | Adds a docs target and marks it as .PHONY. |
| docs/contributing.md | Documents make docs usage, including build-only mode and custom port. |
| devops/scripts/docs.sh | New script to create a venv, install docs deps, and build/serve MkDocs. |
| CHANGELOG.md | Adds an enhancement entry for make docs and reformats some existing entries. |
Comments suppressed due to low confidence (1)
devops/scripts/docs.sh:63
- If no free port is found (or PORT is invalid),
FREE_PORTcan be empty and the script will attempt to runmkdocs servewith an invalid address, producing a confusing failure. Handle the non-zero return fromget_free_portand exit with a clear message before starting MkDocs.
serve)
FREE_PORT=$(get_free_port "$PORT")
if [ "$FREE_PORT" != "$PORT" ]; then
echo "Port $PORT is in use. Using next available port: $FREE_PORT"
fi
echo "Starting mkdocs serve (http://127.0.0.1:${FREE_PORT})..."
Comment on lines
+37
to
+51
| get_free_port() { | ||
| local start_port="${1:-8000}" | ||
| "$PY" -c " | ||
| import socket | ||
| start = $start_port | ||
| for p in range(start, start + 100): | ||
| with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: | ||
| try: | ||
| s.bind(('127.0.0.1', p)) | ||
| print(p) | ||
| break | ||
| except OSError: | ||
| continue | ||
| " | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5007
What is being addressed
I want to make it easy to run the docs site locally via a make command
How is this addressed