forked from LuN3cy/LuN3cy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.bat
More file actions
67 lines (56 loc) · 1.81 KB
/
deploy.bat
File metadata and controls
67 lines (56 loc) · 1.81 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
@echo off
echo ========================================================
echo LuN3cy Website Content Update Helper
echo ========================================================
echo.
echo This script will help you upload your changes to GitHub.
echo GitHub Actions will then automatically build and deploy your site.
echo.
echo 1. Adding all changes...
git add .
echo.
set /p commit_msg="Enter a description for this update (e.g., 'Added new photos'): "
if "%commit_msg%"=="" set commit_msg=Content update
echo.
echo 2. Committing changes...
git commit -m "%commit_msg%"
echo.
echo 3. Pulling latest changes from GitHub...
git pull origin main --rebase
if %errorlevel% neq 0 (
echo.
echo [ERROR] Conflict detected or pull failed!
echo Git has stopped to protect your changes.
echo Please resolve conflicts manually before pushing.
pause
exit /b
)
echo.
echo 4. Pushing to GitHub...
:: Increase buffer size and timeout to handle unstable connections
git config http.postBuffer 524288000
git config http.lowSpeedLimit 0
git config http.lowSpeedTime 999999
git config --global http.version HTTP/1.1
:push_retry
git push origin main
if %errorlevel% neq 0 (
echo.
echo [ERROR] Push failed! Connection might be unstable.
echo.
set /p retry="Do you want to retry? (y/n): "
if /i "%retry%"=="y" goto push_retry
echo.
echo Tip: If you are using a VPN, make sure it's ON.
echo If you are NOT using a VPN, you might need one to access GitHub.
pause
exit /b
)
echo.
echo ========================================================
echo Success! Your changes have been pushed.
echo Please wait 1-3 minutes for GitHub Pages to update.
echo You can check progress at: https://github.com/LuN3cy/LuN3cy/actions
echo ========================================================
echo.
pause