1
1
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2
2
# More GitHub Actions for Azure: https://github.com/Azure/actions
3
3
4
- name : pwabuilder-ios to prod
4
+ name : Build and deploy ASP.Net Core app to Azure Web App - pwabuilder-ios
5
5
6
6
on :
7
7
push :
8
8
branches :
9
9
- main
10
+ workflow_dispatch :
10
11
11
12
jobs :
12
13
build :
13
14
runs-on : windows-latest
15
+ permissions :
16
+ contents : read
14
17
15
18
steps :
16
19
- uses : actions/checkout@v4
17
- - uses : microsoft/variable-substitution@v1
18
- with :
19
- files : ' ./Microsoft.PWABuilder.IOS.Web/appsettings.Production.json'
20
- env :
21
- AppSettings.ApplicationInsightsConnectionString : ${{secrets.APPLICATIONINSIGHTSCONNECTIONSTRING}}
20
+
22
21
- name : Set up .NET Core
23
- uses : actions/setup-dotnet@v2
22
+ uses : actions/setup-dotnet@v4
24
23
with :
25
24
dotnet-version : ' 7.x'
26
- include-prerelease : true
27
25
28
26
- name : Build with dotnet
29
27
working-directory : ./Microsoft.PWABuilder.IOS.Web
30
28
run : dotnet build --configuration Release
31
29
32
30
- name : dotnet publish
33
31
working-directory : ./Microsoft.PWABuilder.IOS.Web
34
- run : dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
32
+ run : dotnet publish -c Release -o " ${{env.DOTNET_ROOT}}/myapp"
35
33
36
34
- name : Upload artifact for deployment job
37
35
uses : actions/upload-artifact@v4
@@ -41,30 +39,30 @@ jobs:
41
39
42
40
deploy :
43
41
runs-on : windows-latest
44
- permissions :
45
- id-token : write
46
- contents : read
47
42
needs : build
48
- environment :
49
- name : ' pre'
50
- url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
43
+
44
+ permissions :
45
+ id-token : write # This is required for requesting the JWT
46
+ contents : read # This is required for actions/checkout
51
47
52
48
steps :
53
49
- name : Download artifact from build job
54
50
uses : actions/download-artifact@v4
55
51
with :
56
52
name : .net-app
57
-
58
- - name : Authenticate to Azure
59
- uses : azure/login@v1
53
+
54
+ - name : Login to Azure
55
+ uses : azure/login@v2
60
56
with :
61
57
client-id : ${{ secrets.AZURE_APP_ID }}
62
58
tenant-id : ${{ secrets.AZURE_TENANT_ID }}
63
59
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
64
60
65
61
- name : Deploy to Azure Web App
66
62
id : deploy-to-webapp
67
- uses : azure/webapps-deploy@v2
63
+ uses : azure/webapps-deploy@v3
68
64
with :
69
65
app-name : ' pwabuilder-ios'
66
+ slot-name : ' production'
70
67
package : .
68
+
0 commit comments