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 - text-compare
5-
6- on :
7- push :
8- branches :
9- - main
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 : Set up Node.js version
22- uses : actions/setup-node@v3
23- with :
24- node-version : ' 4.8'
25-
26- - name : npm install, build, and test
27- run : |
28- npm install
29- npm run build --if-present
30- npm run test --if-present
31-
32- - name : Upload artifact for deployment job
33- uses : actions/upload-artifact@v4
34- with :
35- name : node-app
36- path : .
37-
38- deploy :
39- runs-on : ubuntu-latest
40- needs : build
41-
42- steps :
43- - name : Download artifact from build job
44- uses : actions/download-artifact@v4
45- with :
46- name : node-app
47-
48- - name : ' Deploy to Azure Web App'
49- uses : azure/webapps-deploy@v3
50- id : deploy-to-webapp
51- with :
52- app-name : ' text-compare'
53- slot-name : ' Production'
54- package : .
55- publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_4F4C478D91D44F8BBEF8951570103698 }}
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+ # Windows Server
4+
5+ name : Deploy to Azure text-compare
6+
7+ on :
8+ push :
9+ branches :
10+ - main
11+ workflow_dispatch :
12+
13+ jobs :
14+ build :
15+ runs-on : windows-latest
16+ permissions :
17+ contents : read # This is required for actions/checkout
18+
19+ steps :
20+ - uses : actions/checkout@v4
21+
22+ - name : Set up Node.js version
23+ uses : actions/setup-node@v3
24+ with :
25+ node-version : ' 22.x'
26+
27+ - name : npm install, build, and test
28+ run : |
29+ npm install
30+ npm run build:azure
31+ npm run test:headless
32+
33+ - name : Upload artifact for deployment job
34+ uses : actions/upload-artifact@v4
35+ with :
36+ name : node-app
37+ path : ./dist/browser
38+
39+ deploy :
40+ runs-on : ubuntu-latest
41+ needs : build
42+
43+ steps :
44+ - name : Download artifact from build job
45+ uses : actions/download-artifact@v4
46+ with :
47+ name : node-app
48+
49+ - name : ' Deploy to Azure Web App'
50+ id : deploy-to-webapp
51+ uses : azure/webapps-deploy@v3
52+ with :
53+ app-name : ' text-compare'
54+ slot-name : ' Production'
55+ package : .
56+ publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_4F4C478D91D44F8BBEF8951570103698 }}
57+ clean : true
0 commit comments