Skip to content

Add command to Make docs - #5008

Draft
JC-wk wants to merge 8 commits into
microsoft:mainfrom
JC-wk:make-docs
Draft

Add command to Make docs#5008
JC-wk wants to merge 8 commits into
microsoft:mainfrom
JC-wk:make-docs

Conversation

@JC-wk

@JC-wk JC-wk commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

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

  • Add a make docs command to serve documentation
  • Update documentation
  • Update CHANGELOG.md if needed

Copilot AI review requested due to automatic review settings July 27, 2026 14:23
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 8f5fb8a.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 docs target to Makefile that delegates to a new helper script.
  • Add contributor documentation for running MkDocs locally (serve/build/lint).
  • Record the new make docs command in CHANGELOG.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_PORT can be empty and the script will attempt to run mkdocs serve with an invalid address, producing a confusing failure. Handle the non-zero return from get_free_port and 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 thread devops/scripts/docs.sh
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
"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a make docs command to serve documentation

2 participants