Skip to content

Commit cd1a947

Browse files
committed
2 parents 89f5a00 + a1456f0 commit cd1a947

File tree

3 files changed

+72
-3
lines changed

3 files changed

+72
-3
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: CI
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: 12.x
23+
- run: npm ci
24+
- run: npm run build --if-present

.github/workflows/deploy.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow will build and push a node.js application to an Azure Web App when a release is created.
2+
#
3+
# This workflow assumes you have already created the target Azure App Service web app.
4+
# For instructions see https://docs.microsoft.com/azure/app-service/app-service-plan-manage#create-an-app-service-plan
5+
#
6+
# To configure this workflow:
7+
#
8+
# 1. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile.
9+
# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret
10+
#
11+
# 2. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below).
12+
#
13+
# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
14+
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
15+
name: CD
16+
17+
on:
18+
release:
19+
types: [created]
20+
21+
env:
22+
AZURE_WEBAPP_NAME: deserializerV2 # set this to your application's name
23+
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
24+
NODE_VERSION: '12.x' # set this to the node version to use
25+
26+
jobs:
27+
build-and-deploy:
28+
name: Build and Deploy
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Use Node.js ${{ env.NODE_VERSION }}
33+
uses: actions/setup-node@v1
34+
with:
35+
node-version: ${{ env.NODE_VERSION }}
36+
- name: npm install, build, and test
37+
run: |
38+
npm ci
39+
npm run build --if-present
40+
- name: 'Deploy to Azure WebApp'
41+
uses: azure/webapps-deploy@v2
42+
with:
43+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
44+
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
45+
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)