-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·41 lines (32 loc) · 1011 Bytes
/
deploy.sh
File metadata and controls
executable file
·41 lines (32 loc) · 1011 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
#!/bin/bash
# Digital Twin Production Deployment Script
echo "🚀 Starting Digital Twin deployment..."
# Check if we're in the right directory
if [[ ! -f "package.json" || ! -d "convex" ]]; then
echo "❌ Error: Run this script from the digital-twin project root directory"
exit 1
fi
# Install dependencies if needed
echo "📦 Installing dependencies..."
npm ci
# Deploy Convex functions
echo "☁️ Deploying Convex functions..."
npx convex deploy
if [ $? -ne 0 ]; then
echo "❌ Convex deployment failed"
exit 1
fi
# Build the frontend
echo "🔨 Building frontend..."
npm run build
if [ $? -ne 0 ]; then
echo "❌ Frontend build failed"
exit 1
fi
echo "✅ Deployment completed successfully!"
echo ""
echo "📁 Frontend build files are in the 'dist' directory"
echo "🌐 Upload the contents of 'dist' to your web hosting service"
echo "📊 Monitor your deployment at: https://dashboard.convex.dev"
echo ""
echo "🎉 Your Digital Twin Counter is ready for production!"