-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbuild-site.sh
More file actions
executable file
·65 lines (58 loc) · 1.69 KB
/
build-site.sh
File metadata and controls
executable file
·65 lines (58 loc) · 1.69 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
set -e
echo "========================================"
echo " RushTI Website Build Script"
echo "========================================"
echo ""
# Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Check if we're in the right directory
if [ ! -f "mkdocs.yml" ]; then
echo "Error: mkdocs.yml not found. Please run this script from the project root."
exit 1
fi
# Build homepage
echo -e "${BLUE}[1/3] Building homepage...${NC}"
cd site/homepage
if [ ! -d "node_modules" ]; then
echo -e "${YELLOW} Installing dependencies...${NC}"
npm install
fi
npm run build
cd ../..
echo -e "${GREEN} Done!${NC}"
echo ""
# Build documentation
echo -e "${BLUE}[2/3] Building documentation...${NC}"
mkdocs build --site-dir mkdocs_site
echo -e "${GREEN} Done!${NC}"
echo ""
# Merge builds
# Note: We put everything under /rushti/ to match the GitHub Pages URL structure
echo -e "${BLUE}[3/3] Merging builds...${NC}"
rm -rf _site
mkdir -p _site/rushti/docs
cp -r site/homepage/dist/* _site/rushti/
cp -r mkdocs_site/* _site/rushti/docs/
echo -e "${GREEN} Done!${NC}"
echo ""
echo "========================================"
echo -e "${GREEN} Build Complete!${NC}"
echo "========================================"
echo ""
echo -e "${BLUE}Output directory:${NC} _site/"
echo ""
echo "Structure:"
echo " _site/"
echo " └── rushti/"
echo " ├── index.html (Homepage)"
echo " ├── assets/ (Homepage assets)"
echo " └── docs/ (MkDocs documentation)"
echo ""
echo -e "${BLUE}To preview locally:${NC}"
echo " cd _site && python3 -m http.server 8000"
echo " Open http://localhost:8000/rushti/"
echo ""