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 app to Azure Web App - telecom-customer-app
5
+
6
+ on :
7
+ push :
8
+ branches :
9
+ - master
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : windows-latest
15
+ permissions :
16
+ contents : read # This is required for actions/checkout
17
+
18
+ steps :
19
+ - uses : actions/checkout@v4
20
+
21
+ - name : Setup MSBuild path
22
+ uses : microsoft/setup-msbuild@v1.0.2
23
+
24
+ - name : Setup NuGet
25
+ uses : NuGet/setup-nuget@v1.0.5
26
+
27
+ - name : Restore NuGet packages
28
+ run : nuget restore
29
+
30
+ - name : Publish to folder
31
+ run : msbuild /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="\published\"
32
+
33
+ - name : Upload artifact for deployment job
34
+ uses : actions/upload-artifact@v4
35
+ with :
36
+ name : ASP-app
37
+ path : ' /published/**'
38
+
39
+ deploy :
40
+ runs-on : windows-latest
41
+ needs : build
42
+ environment :
43
+ name : ' Production'
44
+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
45
+ permissions :
46
+ id-token : write # This is required for requesting the JWT
47
+ contents : read # This is required for actions/checkout
48
+
49
+ steps :
50
+ - name : Download artifact from build job
51
+ uses : actions/download-artifact@v4
52
+ with :
53
+ name : ASP-app
54
+
55
+ - name : Login to Azure
56
+ uses : azure/login@v2
57
+ with :
58
+ client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_1F0695EC39CC4DA0ABE8CC0A87BF0C23 }}
59
+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_82897C6A43A64216A6F18975DCBE2839 }}
60
+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_12383CBB68AC4453A92AB0B0DEF2A542 }}
61
+
62
+ - name : Deploy to Azure Web App
63
+ id : deploy-to-webapp
64
+ uses : azure/webapps-deploy@v3
65
+ with :
66
+ app-name : ' telecom-customer-app'
67
+ slot-name : ' Production'
68
+ package : .
69
+
0 commit comments