Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

🚀 github-actions azure deploy #268

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/azure-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Azure Deploy

on:
push:
branches:
- master

env:
AZURE_WEBAPP_NAME: TypeScript-Node-Starter
AZURE_WEBAPP_PACKAGE_PATH: "."
NODE_VERSION: "12.x"

jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Start Docker for Mongodb
run: docker run -d -p 27017:27017 mongo
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: "Deploy to Azure WebApp"
uses: azure/webapps-deploy@v1
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
3 changes: 3 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Start Docker for Mongodb
run: docker run -d -p 27017:27017 mongo
- name: npm install, build, and test
run: |
npm ci
npm run build --if-present
npm run test --if-present
env:
CI: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TypeScript Node Starter

[![Dependency Status](https://david-dm.org/Microsoft/TypeScript-Node-Starter.svg)](https://david-dm.org/Microsoft/TypeScript-Node-Starter) [![Build Status](https://travis-ci.org/Microsoft/TypeScript-Node-Starter.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript-Node-Starter)
[![Dependency Status](https://david-dm.org/Microsoft/TypeScript-Node-Starter.svg)](https://david-dm.org/Microsoft/TypeScript-Node-Starter) [![Build Status](https://travis-ci.org/Microsoft/TypeScript-Node-Starter.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript-Node-Starter) ![Node CI](https://github.com/microsoft/TypeScript-Node-Starter/workflows/Node%20CI/badge.svg?branch=master) ![Azure Deploy](https://github.com/microsoft/TypeScript-Node-Starter/workflows/Azure%20Deploy/badge.svg?branch=master)

**Live Demo**: [https://typescript-node-starter.azurewebsites.net/](https://typescript-node-starter.azurewebsites.net/)

Expand Down