diff --git a/.github/workflows/master_github20210112no(staging).yml b/.github/workflows/master_github20210112no(staging).yml new file mode 100644 index 00000000..9bee6ce4 --- /dev/null +++ b/.github/workflows/master_github20210112no(staging).yml @@ -0,0 +1,38 @@ +# 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: + 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 + + - 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: . 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