-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·39 lines (30 loc) · 849 Bytes
/
deploy.sh
File metadata and controls
executable file
·39 lines (30 loc) · 849 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
#!/bin/bash
# Deployment Script for NutriVision
echo "🚀 Starting Deployment Sequence..."
# 1. Clean previous build
echo "🧹 Cleaning previous build..."
rm -rf dist
# 2. Install dependencies (if needed, skipping for speed in this script usually)
# echo "📦 Checking dependencies..."
# npm install
# 3. Type Check
echo "🛡️ Running Type Safety Checks..."
npx tsc --noEmit
if [ $? -ne 0 ]; then
echo "❌ Type check failed. Aborting deployment."
exit 1
fi
# 4. Build
echo "🏗️ Building for Production..."
npm run build
if [ $? -ne 0 ]; then
echo "❌ Build failed. Aborting deployment."
exit 1
fi
echo "✅ Build Successful!"
# 5. Host (Preview)
echo "🌐 Hosting Production Build locally..."
echo " Access the app at the URL below."
echo " (Press Ctrl+C to stop hosting)"
echo ""
npm run preview -- --host