app #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File: .github/workflows/workflow.yml | |
on: | |
workflow_dispatch: | |
name: app | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# checkout the repo | |
- name: 'Checkout Github Action' | |
uses: actions/checkout@master | |
- name: Setup Node 10.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '10.x' | |
- name: 'npm install, build, and test' | |
run: | | |
cd app | |
npm install | |
npm run build --if-present | |
npm run test --if-present | |
- name: Azure Login | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: 'Azure webapp deploy' | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: ${{ secrets.WEBAPP }} | |
package: ${{ github.workspace }}/app |