feat: add romhack archive site
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
param(
|
||||
[string]$Server = "ginnoir@valhalla",
|
||||
[string]$RemotePath = "/config/caddy/site/romhacks-wiki"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$RepoRoot = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path)
|
||||
$Dist = Join-Path $RepoRoot "dist"
|
||||
|
||||
if (-not (Test-Path $Dist)) {
|
||||
throw "dist/ does not exist. Run npm run build first."
|
||||
}
|
||||
|
||||
Write-Host "Preparing remote site directory $RemotePath ..."
|
||||
ssh $Server "mkdir -p '$RemotePath'"
|
||||
|
||||
Write-Host "Syncing built site to $Server:$RemotePath ..."
|
||||
scp -r (Join-Path $Dist "*") "${Server}:$RemotePath/"
|
||||
|
||||
Write-Host "Reloading Caddy ..."
|
||||
ssh $Server "docker exec caddy caddy reload --config /etc/caddy/Caddyfile"
|
||||
|
||||
Write-Host "Deployed ROM Hack Archive to https://romhacks.ginnoir.com"
|
||||
Reference in New Issue
Block a user