File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Expand file tree Collapse file tree 1 file changed +62
-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 - academy-parse-server
5+
6+ on :
7+ push :
8+ branches :
9+ - release
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 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 : Zip artifact for deployment
31+ run : zip release.zip ./* -r
32+
33+ - name : Upload artifact for deployment job
34+ uses : actions/upload-artifact@v4
35+ with :
36+ name : node-app
37+ path : release.zip
38+
39+ deploy :
40+ runs-on : ubuntu-latest
41+ needs : build
42+ environment :
43+ name : ' Production'
44+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
45+
46+ steps :
47+ - name : Download artifact from build job
48+ uses : actions/download-artifact@v4
49+ with :
50+ name : node-app
51+
52+ - name : Unzip artifact for deployment
53+ run : unzip release.zip
54+
55+ - name : ' Deploy to Azure Web App'
56+ id : deploy-to-webapp
57+ uses : azure/webapps-deploy@v3
58+ with :
59+ app-name : ' academy-parse-server'
60+ slot-name : ' Production'
61+ package : .
62+ publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_558B6D3CCB184861BC3B58C21B79C680 }}
You can’t perform that action at this time.
0 commit comments