From cb08e11593f214ea63bebca7b176a6c9aa4f0129 Mon Sep 17 00:00:00 2001 From: Mahan Chamani <109232147+mahanch@users.noreply.github.com> Date: Sat, 22 Nov 2025 13:42:25 +0330 Subject: [PATCH] Refactor IIS deployment step in workflow --- .github/workflows/dotnet-developPublish.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dotnet-developPublish.yml b/.github/workflows/dotnet-developPublish.yml index ddb25830..957f30c8 100644 --- a/.github/workflows/dotnet-developPublish.yml +++ b/.github/workflows/dotnet-developPublish.yml @@ -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