1- # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2- # More GitHub Actions for Azure: https://github.com/Azure/actions
3-
41name : Build and deploy ASP.Net Core app to Azure Web App - basicwebappusinggithub
52
63on :
@@ -13,29 +10,25 @@ jobs:
1310 build :
1411 runs-on : self-hosted
1512 permissions :
16- contents : read # This is required for actions/checkout
13+ contents : read # This is required for actions/checkout
1714
1815 steps :
1916 - uses : actions/checkout@v4
2017
21- - name : Set up .NET Core
22- uses : actions/setup-dotnet@v4
23- with :
24- dotnet-version : ' 8.x'
25- install-dir : ${{ runner.temp }}/dotnet
18+ - name : Display .NET version
19+ run : dotnet --version # Check if .NET SDK is installed
2620
2721 - name : Build with dotnet
2822 run : dotnet build --configuration Release
2923
3024 - name : dotnet publish
31- run : ${{ runner.temp }}/dotnet/dotnet publish -c Release -o "${{ runner.temp }}/myapp"
32-
25+ run : dotnet publish -c Release -o "./myapp"
3326
3427 - name : Upload artifact for deployment job
3528 uses : actions/upload-artifact@v4
3629 with :
3730 name : .net-app
38- path : ${{env.DOTNET_ROOT}} /myapp
31+ path : . /myapp
3932
4033 deploy :
4134 runs-on : self-hosted
4437 name : ' Production'
4538 url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
4639 permissions :
47- id-token : write # This is required for requesting the JWT
48- contents : read # This is required for actions/checkout
40+ id-token : write # This is required for requesting the JWT
41+ contents : read # This is required for actions/checkout
4942
5043 steps :
5144 - name : Download artifact from build job
6659 with :
6760 app-name : ' basicwebappusinggithub'
6861 slot-name : ' Production'
69- package : .
70-
62+ package : ./myapp
0 commit comments