[CmdletBinding()]
param(
  [switch]$Force,
  [switch]$SkipSiteCheck,
  [string]$Service
)

$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$repoRoot = Split-Path -Parent $scriptDir
$rootDeployScript = Join-Path $repoRoot 'deploy.ps1'

if (-not (Test-Path -LiteralPath $rootDeployScript)) {
  throw "Root deploy script not found: $rootDeployScript"
}

Write-Warning 'scripts/deploy.ps1 is deprecated. Use .\deploy.ps1 from the repo root instead.'

& $rootDeployScript @PSBoundParameters

if ($LASTEXITCODE -ne 0) {
  exit $LASTEXITCODE
}
