Skip to content

Commit e947d3e

Browse files
post deployment fix
1 parent 793bbb4 commit e947d3e

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

.github/workflows/job-deploy-windows.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -209,24 +209,24 @@ jobs:
209209
210210
- name: Run Post-Deployment Script
211211
id: post_deploy
212-
env:
213-
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
214-
shell: bash
212+
shell: pwsh
215213
run: |
216-
set -e
217-
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
218-
219-
echo "Running post-deployment script..."
220-
221-
bash ./infra/scripts/process_sample_data.sh \
222-
"${{ env.STORAGE_ACCOUNT_NAME }}" \
223-
"${{ env.STORAGE_CONTAINER_NAME }}" \
224-
"${{ env.KEY_VAULT_NAME }}" \
225-
"${{ env.AZURE_COSMOSDB_ACCOUNT }}" \
226-
"${{ env.RESOURCE_GROUP_NAME }}" \
227-
"${{ env.AI_SEARCH_SERVICE_NAME }}" \
228-
"${{ secrets.AZURE_CLIENT_ID }}" \
229-
"${{ env.AI_FOUNDRY_RESOURCE_ID }}"
214+
Write-Host "Running post deployment script to upload files..."
215+
cd Deployment
216+
try {
217+
.\uploadfiles.ps1 -EndpointUrl ${{ env.WEB_APPURL }}
218+
Write-Host "ExitCode: $LASTEXITCODE"
219+
if ($LASTEXITCODE -eq $null -or $LASTEXITCODE -eq 0) {
220+
Write-Host "✅ Post deployment script completed successfully."
221+
} else {
222+
Write-Host "❌ Post deployment script failed with exit code: $LASTEXITCODE"
223+
exit 1
224+
}
225+
}
226+
catch {
227+
Write-Host "❌ Post deployment script failed with error: $($_.Exception.Message)"
228+
exit 1
229+
}
230230
231231
- name: Generate Deploy Job Summary
232232
if: always()

0 commit comments

Comments
 (0)