forked from PierreMesure/whisper-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·79 lines (68 loc) · 2.32 KB
/
deploy.sh
File metadata and controls
executable file
·79 lines (68 loc) · 2.32 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Paths
VOICE_APP_DIR="/Users/sanchitmonga/development/EXTERNAL/whisper-web/whisper-web"
NEXTJS_APP_DIR="/Users/sanchitmonga/development/ODLM/runanywhere_landing_fe/app"
WEB_DEMO_DIR="${NEXTJS_APP_DIR}/public/web-demo"
echo -e "${BLUE}🚀 RunAnywhere Voice Pipeline - Build & Deploy Script${NC}"
echo "=================================================="
# Step 1: Build Voice Pipeline App
echo -e "\n${YELLOW}[1/5] Building Voice Pipeline App...${NC}"
cd "$VOICE_APP_DIR"
# Clean previous build
rm -rf dist
# Build with Vite (skipping TypeScript checks for faster build)
npx vite build
if [ $? -ne 0 ]; then
echo -e "${RED}❌ Voice app build failed!${NC}"
exit 1
fi
echo -e "${GREEN}✓ Voice app built successfully${NC}"
# Step 2: Clean up destination
echo -e "\n${YELLOW}[2/5] Cleaning up destination...${NC}"
rm -rf "$WEB_DEMO_DIR"
echo -e "${GREEN}✓ Old files removed${NC}"
# Step 3: Copy built files
echo -e "\n${YELLOW}[3/5] Copying files to Next.js app...${NC}"
cp -r dist "$WEB_DEMO_DIR"
if [ $? -ne 0 ]; then
echo -e "${RED}❌ Failed to copy files!${NC}"
exit 1
fi
echo -e "${GREEN}✓ Files copied to ${WEB_DEMO_DIR}${NC}"
# Step 4: Build Next.js App
echo -e "\n${YELLOW}[4/5] Building Next.js app...${NC}"
cd "$NEXTJS_APP_DIR"
# Run Next.js build
npm run build
if [ $? -ne 0 ]; then
echo -e "${RED}❌ Next.js build failed!${NC}"
exit 1
fi
echo -e "${GREEN}✓ Next.js app built successfully${NC}"
# Step 5: Summary
echo -e "\n${GREEN}================================${NC}"
echo -e "${GREEN}✅ BUILD COMPLETE!${NC}"
echo -e "${GREEN}================================${NC}"
echo
echo -e "📦 Voice app built at: ${VOICE_APP_DIR}/dist"
echo -e "📋 Copied to: ${WEB_DEMO_DIR}"
echo -e "🏗️ Next.js built at: ${NEXTJS_APP_DIR}/.next"
echo
echo -e "${BLUE}Next steps:${NC}"
echo -e " • Test locally: ${YELLOW}npm run start${NC}"
echo -e " • Deploy to Vercel: ${YELLOW}vercel --prod${NC}"
echo -e " • Access at: ${GREEN}https://runanywhere.ai/web-demo/${NC}"
echo
echo -e "${YELLOW}To run the development server:${NC}"
echo -e " cd ${NEXTJS_APP_DIR}"
echo -e " npm run dev"
echo
echo -e "${YELLOW}To deploy to production:${NC}"
echo -e " cd ${NEXTJS_APP_DIR}"
echo -e " vercel --prod"