-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.bat
More file actions
122 lines (107 loc) · 2.7 KB
/
Copy pathdeploy.bat
File metadata and controls
122 lines (107 loc) · 2.7 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
@echo off
REM Digital Inheritance - Deployment Script for Windows
setlocal enabledelayedexpansion
echo.
echo ==========================================
echo.
echo 🚀 Digital Inheritance Deployment Script
echo.
echo ==========================================
echo.
REM Check if Node.js is installed
where node >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ❌ Node.js not found. Please install Node.js 18+
echo Download from: https://nodejs.org
pause
exit /b 1
)
REM Check if Git is installed
where git >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ❌ Git not found. Please install Git
echo Download from: https://git-scm.com
pause
exit /b 1
)
echo ✅ Prerequisites found
echo.
REM Check if Vercel CLI is installed
where vercel >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ⚠️ Vercel CLI not found. Installing...
call npm install -g vercel
if %ERRORLEVEL% NEQ 0 (
echo ❌ Failed to install Vercel CLI
pause
exit /b 1
)
)
echo.
echo 📦 Installing dependencies...
call npm install
if %ERRORLEVEL% NEQ 0 (
echo ❌ Failed to install dependencies
pause
exit /b 1
)
echo.
echo 📦 Building application...
call npm run build
if %ERRORLEVEL% NEQ 0 (
echo ❌ Build failed
pause
exit /b 1
)
if not exist "dist" (
echo ❌ Build failed - dist folder not created
pause
exit /b 1
)
echo ✅ Build successful
echo.
REM Check if Git repository exists
if not exist ".git" (
echo 📚 Initializing Git repository...
call git init
call git add .
call git commit -m "Initial commit - Digital Inheritance app"
echo.
echo ⚠️ Please add remote repository:
echo git remote add origin ^<your-repo-url^>
echo git branch -M main
echo git push -u origin main
echo.
) else (
echo ✅ Git repository already initialized
echo.
)
REM Deploy to Vercel
echo 🌐 Deploying to Vercel...
echo.
echo This will open your browser to authenticate with Vercel.
echo Follow these steps:
echo 1. Authenticate with your Vercel account
echo 2. Select the project folder as the root
echo 3. Configure build settings (should auto-detect Vite)
echo 4. Complete the deployment
echo.
pause
call vercel --prod
echo.
echo ==========================================
echo ✅ Deployment Complete!
echo ==========================================
echo.
echo 📝 Next Steps:
echo 1. Visit your Vercel dashboard: https://vercel.com
echo 2. Go to your project settings
echo 3. Add environment variables:
echo - VITE_API_BASE_URL: ^<your-backend-api-url^>
echo 4. Redeploy to apply environment variables
echo.
echo 📚 See VERCEL_DEPLOYMENT_GUIDE.md for detailed instructions
echo.
echo ==========================================
echo.
pause