forked from Azure/actions-workflow-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node.js-webapp-on-azure.yml
29 lines (25 loc) · 1.02 KB
/
node.js-webapp-on-azure.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
on: [push, pull_request]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# checkout the repo
- uses: actions/checkout@master
# install dependencies, build, and test
- name: Setup Node 10.x
uses: actions/setup-node@v1
with:
node-version: '10.x' # Replace with specific Node version : 8.x, 10.x, 12.x
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: 'Run Azure webapp deploy action using publish profile credentials'
uses: azure/webapps-deploy@v1
with:
app-name: mynodeapp # Replace with your app name
publish-profile: ${{ secrets.azureWebAppPublishProfile }} # Define secret variable in repository settings as per action documentation
#package: '.' #default value is entire repo
# If your function app project is not located in your repository's root
# Please consider prefixing the project path in this package parameter