diff --git a/scripts/deploy-ftp.ps1 b/scripts/deploy-ftp.ps1 index 48c1c7e..fbc3014 100644 --- a/scripts/deploy-ftp.ps1 +++ b/scripts/deploy-ftp.ps1 @@ -112,9 +112,14 @@ function Set-FrontendAppBaseMeta { [Parameter(Mandatory = $true)][string]$BasePath ) - $indexPath = Join-Path $PublishDir "index.html" - if (-not (Test-Path $indexPath)) { - throw "Publish output is missing index.html at '$indexPath'." + $candidatePaths = @( + (Join-Path $PublishDir "wwwroot\index.html"), + (Join-Path $PublishDir "index.html") + ) + + $indexPath = $candidatePaths | Where-Object { Test-Path $_ } | Select-Object -First 1 + if ([string]::IsNullOrWhiteSpace($indexPath)) { + throw "Publish output is missing index.html. Checked: $($candidatePaths -join ", ")." } $pattern = ''