Skip to content

Commit 70bea7c

Browse files
committed
Update workflow for githubactiontestwkqzezmy-stage
1 parent 117bd84 commit 70bea7c

File tree

2 files changed

+66
-11
lines changed

2 files changed

+66
-11
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 - wkqzezmy-webapp stage
5+
6+
on:
7+
push:
8+
branches:
9+
- githubactiontestwkqzezmy-stage
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: 'wkqzezmy-webapp'
53+
slot-name: 'stage'
54+
publish-profile: ${{ secrets.githubactiontestwkqzezmy_stage }}
55+
package: .

index.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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("wkqzezmy-stage" + 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);

0 commit comments

Comments
 (0)