diff --git a/.github/workflows/dotnet-developPublish.yml b/.github/workflows/dotnet-developPublish.yml index 68742f51..a594b21a 100644 --- a/.github/workflows/dotnet-developPublish.yml +++ b/.github/workflows/dotnet-developPublish.yml @@ -25,14 +25,22 @@ jobs: run: dotnet restore - name: Build - run: dotnet build --configuration Release + run: dotnet build --configuration Release - name: Publish - run: dotnet publish --configuration Release --output ./publish --no-build + run: dotnet publish --configuration Release --output ./publish /p:EnvironmentName=Development --no-build - name: Deploy to IIS via Web Deploy + shell: powershell run: | - msdeploy -verb:sync -source:contentPath="publish" -dest:contentPath="dadmehrg",computerName="https://171.22.24.15:8172/msdeploy.axd?site=dadmehrg",userName=".\deployuser",password="R2rNpdnetP3j>q5b18",authType="Basic" -allowUntrusted + $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=".\deployuser",password="R2rNpdnetP3j>q5b18",authType="Basic" ` + -allowUntrusted ` + -enableRule:AppOffline + env: SERVER_HOST: your-server-ip-or-domain