-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.bat
More file actions
61 lines (54 loc) · 1.54 KB
/
deploy.bat
File metadata and controls
61 lines (54 loc) · 1.54 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
@echo off
chcp 65001 >nul
echo ========================================
echo 住宅 IP 检测工具 - GitHub 部署脚本
echo ========================================
echo.
REM 检查是否已初始化 Git
if not exist .git (
echo [1/5] 初始化 Git 仓库...
git init
echo.
) else (
echo [1/5] Git 仓库已存在,跳过初始化
echo.
)
REM 添加所有文件
echo [2/5] 添加文件到 Git...
git add .
echo.
REM 提交
echo [3/5] 提交更改...
git commit -m "Initial commit: Add residential IP checker"
echo.
REM 询问 GitHub 用户名
echo [4/5] 配置远程仓库
set /p username="请输入你的 GitHub 用户名: "
echo.
REM 添加远程仓库
echo 添加远程仓库...
git remote remove origin 2>nul
git remote add origin https://github.com/%username%/residential-ip-checker.git
echo.
REM 推送到 GitHub
echo [5/5] 推送到 GitHub...
echo.
echo 注意:如果是第一次推送,可能需要输入 GitHub 用户名和密码
echo (建议使用 Personal Access Token 代替密码)
echo.
git branch -M main
git push -u origin main
echo.
echo ========================================
echo 部署完成!
echo ========================================
echo.
echo 接下来的步骤:
echo 1. 访问 https://github.com/%username%/residential-ip-checker
echo 2. 进入 Settings ^> Pages
echo 3. Source 选择 main 分支
echo 4. 保存后等待 1-2 分钟
echo 5. 访问 https://%username%.github.io/residential-ip-checker/
echo.
echo 按任意键退出...
pause >nul