44
55echo " === VERCEL BUILD - PRODUCTION ==="
66
7- # Install dependencies
8- echo " Installing dependencies..."
9- uv pip install --system -r requirements.txt
7+ # Install dependencies into a virtual environment
8+ echo " Creating virtual environment and installing dependencies..."
9+ uv venv --python 3.12 .venv
10+ uv pip install -r requirements.txt
1011
11- # Create minimal mkdocs wrapper for mike to find
12- echo " Creating minimal mkdocs wrapper for mike..."
13- cat > mkdocs << 'EOF '
14- #!/bin/bash
15- exec uv run python3 -c "from mkdocs.__main__ import cli; cli()" "$@"
16- EOF
17- chmod +x mkdocs
18-
19- # Add current directory to PATH so mike can find our mkdocs wrapper
20- export PATH=" .:$PATH "
12+ # Add venv bin to PATH so mike/mkdocs are found directly
13+ export PATH=" $( pwd) /.venv/bin:$PATH "
2114
22- echo " mkdocs wrapper created and added to PATH"
15+ echo " Virtual environment created and added to PATH"
2316
2417# FORCE cleanup of any existing content
2518echo " Force cleaning any existing directories..."
@@ -89,13 +82,13 @@ build_version() {
8982
9083 echo " Deploying version $version with preserved git history"
9184 if [ -n " $alias " ] && [ -n " $title " ]; then
92- uv run mike deploy " $version " " $alias " --title=" $title "
85+ mike deploy " $version " " $alias " --title=" $title "
9386 elif [ -n " $alias " ]; then
94- uv run mike deploy " $version " " $alias "
87+ mike deploy " $version " " $alias "
9588 elif [ -n " $title " ]; then
96- uv run mike deploy " $version " --title=" $title "
89+ mike deploy " $version " --title=" $title "
9790 else
98- uv run mike deploy " $version "
91+ mike deploy " $version "
9992 fi
10093
10194 echo " Rocky Linux $version deployed successfully with git history preserved"
@@ -116,7 +109,6 @@ git config user.email "webmaster@rockylinux.org"
116109# Create initial commit
117110echo " # Rocky Linux Docs Build" > README.md
118111git add README.md
119- git add -f mkdocs # Force add mkdocs wrapper even if in gitignore elsewhere
120112git commit -m " Initial commit for Vercel build $( date) "
121113
122114# Build each version from its respective branch
@@ -125,13 +117,13 @@ build_version "9" "rocky-9" "" ""
125117build_version " 10" " main" " latest" " "
126118
127119echo " Setting default version..."
128- uv run mike set-default latest
120+ mike set-default latest
129121
130122echo " All versions deployed successfully"
131123
132124# Verify mike state
133125echo " Verifying mike deployment..."
134- uv run mike list
126+ mike list
135127
136128echo " Extracting built site for Vercel with ROOT + VERSIONED deployment..."
137129
0 commit comments