Lashtw commited on
Commit
995d2cd
·
1 Parent(s): 997c79f

chore: 加入一鍵自動部署至 Hugging Face 腳本

Browse files
Files changed (2) hide show
  1. deploy_hf.bat +13 -0
  2. tools/deploy_hf.ps1 +18 -0
deploy_hf.bat ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ chcp 65001 >nul
3
+ echo 🚀 正在自動同步專案至 Hugging Face Spaces (Lashtw/idle)...
4
+ git add .
5
+ set /p commit_msg="請輸入更新說明(直接按 Enter 使用預設說明): "
6
+ if "%commit_msg%"=="" set commit_msg=feat: 遊戲版本更新
7
+ git commit -m "%commit_msg%"
8
+ echo 📦 正在推送到 Hugging Face...
9
+ git push hf main
10
+ echo.
11
+ echo ✅ 部署完成!請開啟 Space 查看:
12
+ echo https://huggingface.co/spaces/Lashtw/idle
13
+ pause
tools/deploy_hf.ps1 ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 放置遊戲一鍵自動部署至 Hugging Face Spaces 腳本
2
+ param(
3
+ [string]$msg = "feat: 自動同步更新至 Hugging Face"
4
+ )
5
+
6
+ Write-Host "🚀 正在整理專案並提交變更..." -ForegroundColor Cyan
7
+ git add .
8
+ git commit -m $msg
9
+
10
+ Write-Host "📦 正在推送到 Hugging Face Spaces (Lashtw/idle)..." -ForegroundColor Yellow
11
+ git push hf main
12
+
13
+ if ($LASTEXITCODE -eq 0) {
14
+ Write-Host "✅ 成功推送到 Hugging Face Spaces!" -ForegroundColor Green
15
+ Write-Host "🌐 線上網址:https://huggingface.co/spaces/Lashtw/idle" -ForegroundColor Cyan
16
+ } else {
17
+ Write-Host "❌ 推送失敗,請檢查網路連線或 Token 權限!" -ForegroundColor Red
18
+ }