File tree 2 files changed +66
-11
lines changed
2 files changed +66
-11
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 - aoxrzbny-webapp production
5
+
6
+ on :
7
+ push :
8
+ branches :
9
+ - githubactiontestaoxrzbny
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@v2
18
+
19
+ - name : Set up Node.js version
20
+ uses : actions/setup-node@v1
21
+ with :
22
+ node-version : ' 14.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
+ - name : Upload artifact for deployment job
30
+ uses : actions/upload-artifact@v2
31
+ with :
32
+ name : node-app
33
+ path : .
34
+
35
+ deploy :
36
+ runs-on : ubuntu-latest
37
+ needs : build
38
+ environment :
39
+ name : ' production'
40
+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
41
+
42
+ steps :
43
+ - name : Download artifact from build job
44
+ uses : actions/download-artifact@v2
45
+ with :
46
+ name : node-app
47
+
48
+ - name : ' Deploy to Azure Web App'
49
+ id : deploy-to-webapp
50
+ uses : azure/webapps-deploy@v2
51
+ with :
52
+ app-name : ' aoxrzbny-webapp'
53
+ slot-name : ' production'
54
+ publish-profile : ${{ secrets.githubactiontestaoxrzbny }}
55
+ package : .
Original file line number Diff line number Diff line change 1
- const http = require ( 'http' ) ;
2
-
3
- const server = http . createServer ( ( request , response ) => {
4
- response . writeHead ( 200 , { "Content-Type" : "text/plain" } ) ;
5
- response . end ( "Hello, World! " + process . versions . node ) ;
6
- } ) ;
7
-
8
- const port = process . env . PORT || 1337 ;
9
- server . listen ( port ) ;
10
-
11
- console . log ( "Server running at http://localhost:%d" , port ) ;
1
+ const http = require ( 'http' ) ;
2
+
3
+ const server = http . createServer ( ( request , response ) => {
4
+ response . writeHead ( 200 , { "Content-Type" : "text/plain" } ) ;
5
+ response . end ( "aoxrzbny " + process . versions . node ) ;
6
+ } ) ;
7
+
8
+ const port = process . env . PORT || 1337 ;
9
+ server . listen ( port ) ;
10
+
11
+ console . log ( "Server running at http://localhost:%d" , port ) ;
You can’t perform that action at this time.
0 commit comments