From bed1b295d6d40c8a4b9b1d9d5350457aa8ff582e Mon Sep 17 00:00:00 2001 From: nookamoto <67989022+nookamoto@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:19:06 +0900 Subject: [PATCH 1/6] [update]:add CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CIテンプレートを追加 --- .github/workflows/node.js.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 00000000..a847e32d --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ master ] + + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x, 15.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test From 4a07e27c093c9af63f9df2fb3552559a322e6e17 Mon Sep 17 00:00:00 2001 From: nookamoto <67989022+nookamoto@users.noreply.github.com> Date: Tue, 12 Jan 2021 17:06:16 +0900 Subject: [PATCH 2/6] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4c7e0b60..461ad588 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const server = require("server"); const chalk = require("chalk"); const ora = require("ora"); - +//hello const { error, get } = server.router; const { render, status } = server.reply; From 5c06c1dfdc1a7ed153dda4ed6c571925750a2d4c Mon Sep 17 00:00:00 2001 From: nookamoto <67989022+nookamoto@users.noreply.github.com> Date: Tue, 12 Jan 2021 17:46:11 +0900 Subject: [PATCH 3/6] =?UTF-8?q?Azure=20portal=20=E3=81=8B=E3=82=89=20App?= =?UTF-8?q?=20Service=20=E3=83=87=E3=83=97=E3=83=AD=E3=82=A4=E3=81=AE?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC=E6=A7=8B?= =?UTF-8?q?=E6=88=90=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=BE=E3=81=9F=E3=81=AF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=97=E3=81=BE=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../master_github20210112no(staging).yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/master_github20210112no(staging).yml diff --git a/.github/workflows/master_github20210112no(staging).yml b/.github/workflows/master_github20210112no(staging).yml new file mode 100644 index 00000000..b55d14a1 --- /dev/null +++ b/.github/workflows/master_github20210112no(staging).yml @@ -0,0 +1,35 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy Node.js app to Azure Web App - github20210112no(staging) + +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: Set up Node.js version + uses: actions/setup-node@v1 + with: + node-version: '10.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + with: + app-name: 'github20210112no' + slot-name: 'staging' + publish-profile: ${{ secrets.AzureAppService_PublishProfile_9e8038279f4e42cf81aac1d04a688ed6 }} + package: . \ No newline at end of file From 59f34e951d25e3395cb8d5893960975ca043c934 Mon Sep 17 00:00:00 2001 From: nookamoto <67989022+nookamoto@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:56:53 +0900 Subject: [PATCH 4/6] Update master_github20210112no(staging).yml --- .github/workflows/master_github20210112no(staging).yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master_github20210112no(staging).yml b/.github/workflows/master_github20210112no(staging).yml index b55d14a1..81768135 100644 --- a/.github/workflows/master_github20210112no(staging).yml +++ b/.github/workflows/master_github20210112no(staging).yml @@ -4,9 +4,10 @@ name: Build and deploy Node.js app to Azure Web App - github20210112no(staging) on: - push: + pull_request: branches: - master + jobs: build-and-deploy: @@ -32,4 +33,4 @@ jobs: app-name: 'github20210112no' slot-name: 'staging' publish-profile: ${{ secrets.AzureAppService_PublishProfile_9e8038279f4e42cf81aac1d04a688ed6 }} - package: . \ No newline at end of file + package: . From f7ee0f8b3d89032ab4ad91f360382993c9a9b98a Mon Sep 17 00:00:00 2001 From: nookamoto <67989022+nookamoto@users.noreply.github.com> Date: Tue, 12 Jan 2021 19:04:44 +0900 Subject: [PATCH 5/6] Update master_github20210112no(staging).yml --- .github/workflows/master_github20210112no(staging).yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/master_github20210112no(staging).yml b/.github/workflows/master_github20210112no(staging).yml index 81768135..9bee6ce4 100644 --- a/.github/workflows/master_github20210112no(staging).yml +++ b/.github/workflows/master_github20210112no(staging).yml @@ -7,11 +7,13 @@ on: pull_request: branches: - master + types: [closed] jobs: build-and-deploy: runs-on: ubuntu-latest + if: github.event.pull_request.merged == true steps: - uses: actions/checkout@master From 18dd07eb877a130446d9c1ef6179a67621a9270a Mon Sep 17 00:00:00 2001 From: nookamoto <67989022+nookamoto@users.noreply.github.com> Date: Tue, 12 Jan 2021 19:05:20 +0900 Subject: [PATCH 6/6] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 461ad588..4c7e0b60 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const server = require("server"); const chalk = require("chalk"); const ora = require("ora"); -//hello + const { error, get } = server.router; const { render, status } = server.reply;