aboutsummaryrefslogtreecommitdiffhomepage
path: root/deploy.ps1
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-06-19 00:22:53 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-06-19 00:22:53 +0900
commitecd6f1661333e66f39f2b4e1ada1ba46d993172a (patch)
tree75496a20bb431c60841854e0d9226e4e23f04062 /deploy.ps1
parent5bc1e63756cae6974430f1e6cf1a4d5e88f5b9cc (diff)
Initial commit
Diffstat (limited to 'deploy.ps1')
-rw-r--r--deploy.ps140
1 files changed, 0 insertions, 40 deletions
diff --git a/deploy.ps1 b/deploy.ps1
deleted file mode 100644
index 030a2ce..0000000
--- a/deploy.ps1
+++ /dev/null
@@ -1,40 +0,0 @@
-# Deploy: build and push dist/ to XServer via git
-# - Git delta compression: only changes are transferred (fast)
-# - *.yasutakeyohei.com folders are protected by .gitignore
-# Prerequisite: `ssh xserver` works (configured in ~/.ssh/config)
-# Usage: .\deploy.ps1
-
-param(
- [string]$Remote = "xserver:/home/wais/yasutakeyohei.com/repo.git"
-)
-
-$ErrorActionPreference = "Stop"
-
-Write-Host "=== Build ===" -ForegroundColor Cyan
-npm run build
-if ($LASTEXITCODE -ne 0) { throw "Build failed." }
-
-Write-Host ""
-Write-Host "=== Deploy ===" -ForegroundColor Cyan
-Write-Host "Target: $Remote"
-
-$deployDir = ".deploy"
-
-# 前回の .deploy を削除
-if (Test-Path $deployDir) { Remove-Item -Recurse -Force $deployDir }
-
-# dist/ をコピー
-Copy-Item -Recurse dist $deployDir
-
-# git 操作
-Push-Location $deployDir
-try {
- git init
- git add -A
- git commit -m "deploy" --allow-empty --quiet
- git push -f $Remote main
-} finally {
- Pop-Location
-}
-
-Write-Host "Done." -ForegroundColor Green