-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.bat
More file actions
37 lines (32 loc) · 774 Bytes
/
Copy pathdeploy.bat
File metadata and controls
37 lines (32 loc) · 774 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
@echo off
echo [1/4] Building the Astro project...
call npm run build
if %errorlevel% neq 0 (
echo.
echo Build failed! Aborting deployment.
pause
exit /b %errorlevel%
)
echo.
echo [2/4] Staging files for Git...
git add .
echo.
set /p commit_msg="[3/4] Enter commit message (or press Enter for default 'update site'): "
if "%commit_msg%"=="" set commit_msg=update site
echo.
echo Committing as: "%commit_msg%"
git commit -m "%commit_msg%"
echo.
echo [4/4] Pushing to GitHub...
git push
if %errorlevel% neq 0 (
echo.
echo Wait, push failed. You might need to pull first or check your connection.
pause
exit /b %errorlevel%
)
echo.
echo ===============================
echo Deployment successful!
echo ===============================
pause