Refactor IIS deployment step in workflow

This commit is contained in:
Mahan Chamani
2025-11-22 13:42:25 +03:30
committed by GitHub
parent 7eba632f1c
commit cb08e11593

View File

@@ -29,13 +29,9 @@ jobs:
- name: Publish
run: dotnet publish ServiceHost/ServiceHost.csproj --configuration Release --output ./publish /p:EnvironmentName=Development --no-build
- name: Deploy to IIS via Web Deploy
- name: Deploy to IIS via Web Deploy
shell: powershell
run: |
$publishFolder = Resolve-Path ./publish
& "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" `
-verb:sync `
-source:contentPath="$publishFolder" `
-dest:contentPath="dadmehrg",computerName="https://171.22.24.15:8172/msdeploy.axd?site=dadmehrg",userName="${{ secrets.DEPLOY_USER }}",password="${{ secrets.DEPLOY_PASSWORD }}",authType="Basic" `
-allowUntrusted `
-enableRule:AppOffline
$publishFolder = Resolve-Path ./publish & "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe"
-verb:sync
-source:contentPath="$publishFolder" -dest:contentPath="dadmehrg",computerName="https://171.22.24.15:8172/msdeploy.axd?site=dadmehrg",userName="Administrator",password="R2rNpdnetP3j>q5b18",authType="Basic" -allowUntrusted -enableRule:AppOffline