File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change 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+
4+ name : Build and deploy ASP.Net Core app to Azure Web App - msdocs-core-sql-SKU
5+
6+ on :
7+ push :
8+ branches :
9+ - starter-no-infra
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - name : Set up .NET Core
20+ uses : actions/setup-dotnet@v4
21+ with :
22+ dotnet-version : ' 8.x'
23+
24+ - name : Build with dotnet
25+ run : dotnet build --configuration Release
26+
27+ - name : dotnet publish
28+ run : dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
29+
30+ - name : Upload artifact for deployment job
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : .net-app
34+ path : ${{env.DOTNET_ROOT}}/myapp
35+
36+ deploy :
37+ runs-on : ubuntu-latest
38+ needs : build
39+ environment :
40+ name : ' Production'
41+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
42+ permissions :
43+ id-token : write # This is required for requesting the JWT
44+
45+ steps :
46+ - name : Download artifact from build job
47+ uses : actions/download-artifact@v4
48+ with :
49+ name : .net-app
50+
51+ - name : Login to Azure
52+ uses : azure/login@v2
53+ with :
54+ client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_04DE9AB439104D1EAD3427F2C206F562 }}
55+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_8BC5AE0AF318453FBF240EBE0CED14BB }}
56+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_E75A808AF0B94F04A0A4839A2E61E448 }}
57+
58+ - name : Deploy to Azure Web App
59+ id : deploy-to-webapp
60+ uses : azure/webapps-deploy@v3
61+ with :
62+ app-name : ' msdocs-core-sql-SKU'
63+ slot-name : ' Production'
64+ package : .
65+
You can’t perform that action at this time.
0 commit comments