Skip to content

Commit b0a9dc8

Browse files
use uv run with for docs sync (#20987)
1 parent 6ea3c0a commit b0a9dc8

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

scripts/sync-docs-to-developer-hub.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,15 @@ if [ ! -f "$MKDOCS_CONFIG" ]; then
9595
exit 1
9696
fi
9797

98-
# Build mkdocs
98+
# Build mkdocs — use uv run --with to install mkdocs and plugins on-the-fly
99+
# without polluting the main project dependencies
100+
MKDOCS_DEPS="mkdocs>=1.6.1,mkdocs-material>=9.6.14,mkdocstrings[python]>=0.29.1,mkdocs-click>=0.9.0,mkdocs-include-dir-to-nav>=1.2.0,mkdocs-render-swagger-plugin>=0.1.2,mkdocs-github-admonitions-plugin>=0.0.3,griffe-fieldz>=0.2.1"
101+
99102
echo "Running mkdocs build..."
100103
cd "$REPO_ROOT"
101-
uv run mkdocs build -f "$MKDOCS_CONFIG" -d "$API_DOCS_BUILD_DIR"
104+
uv run \
105+
--with "$MKDOCS_DEPS" \
106+
mkdocs build -f "$MKDOCS_CONFIG" -d "$API_DOCS_BUILD_DIR"
102107

103108
echo "Syncing API docs to $API_DOCS_DEST_DIR"
104109
mkdir -p "$API_DOCS_DEST_DIR"

0 commit comments

Comments
 (0)