-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_docs.sh
More file actions
executable file
·43 lines (36 loc) · 961 Bytes
/
build_docs.sh
File metadata and controls
executable file
·43 lines (36 loc) · 961 Bytes
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
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Build MkDocs Documentation
# This script builds the static documentation site
echo "🏗️ Building MkDocs documentation..."
echo ""
# Activate virtual environment if it exists
if [ -d "venv" ]; then
echo "Activating virtual environment..."
source venv/bin/activate
fi
# Check if MkDocs is installed
if ! command -v mkdocs &> /dev/null; then
echo "⚠️ MkDocs not found. Installing..."
pip install -r requirements.txt
fi
# Clean previous build
if [ -d "site" ]; then
echo "🗑️ Removing previous build..."
rm -rf site
fi
# Build documentation
echo "📦 Building site..."
mkdocs build --strict
# Check build status
if [ $? -eq 0 ]; then
echo ""
echo "✅ Documentation built successfully!"
echo "📁 Output directory: site/"
echo ""
echo "To deploy to GitHub Pages, run:"
echo " mkdocs gh-deploy"
else
echo ""
echo "❌ Build failed. Check the errors above."
exit 1
fi