I’m trying to get a self-hosted runner which I installed on one of our internal servers and configured with the repository we have in our GitHub organization, to deploy to another internal server. The code base is an old ASP.NET app currently using .NET Framework 4.5.2. For that reason, I’m using MSBuild in the GitHub workflow. I’ve been following a GitHub Gist I found that describes using MSBuild in the YAML file, specifically this section. However, that section uses placeholders, so I’ve been looking elsewhere to try and see how to specify parameters such as MSDeployServiceURL. I found this SO post with an answer that discussed that. However, the GitHub workflow still doesn’t publish to the other server. And there’s no errors, so I don’t know what’s wrong. Here’s some code snippet from the YAML file:
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected]
with:
nuget-version: latest
- name: Restore NuGet Packages
run: nuget restore $env:Solution_Name
- name: Build and Publish
run: msbuild $env:Solution_Name /p:Configuration=Release /p:DeployOnBuild=True /p:DeployIisAppPath="Default Web Site/TimeTrack_Test" /p:WebPublishMethod=MSDeploy /p:MSDeployServiceURL=**localhost** /p:DeleteExistingFiles=True /p:UserName="$env:DOH_Build_Account" /p:Password="$env:DOH_Build_Password" /p:PublishProfile=Default
How do I make MSBuild deploy to another server in our network, from the GitHub self-hosted runner?