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 Node.js app to Azure Web App - advasearch
5
+
6
+ on :
7
+ push :
8
+ branches :
9
+ - main
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : windows-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+
19
+ - name : Set up Node.js version
20
+ uses : actions/setup-node@v3
21
+ with :
22
+ node-version : ' 20.x'
23
+
24
+ - name : npm install, build, and test
25
+ run : |
26
+ npm install
27
+ npm run build --if-present
28
+ npm run test --if-present
29
+
30
+ - name : Upload artifact for deployment job
31
+ uses : actions/upload-artifact@v4
32
+ with :
33
+ name : node-app
34
+ path : .
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 : node-app
50
+
51
+ - name : Login to Azure
52
+ uses : azure/login@v2
53
+ with :
54
+ client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_1233A331466643E9AB08410D3747B9DC }}
55
+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_6478B25E2C1C475BB4613A2FE631D402 }}
56
+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_990D85488E0940E88CD9A1A4D8CAA718 }}
57
+
58
+ - name : ' Deploy to Azure Web App'
59
+ uses : azure/webapps-deploy@v3
60
+ id : deploy-to-webapp
61
+ with :
62
+ app-name : ' advasearch'
63
+ slot-name : ' Production'
64
+ package : .
65
+
You can’t perform that action at this time.
0 commit comments