Merge pull request #1099 from OneCommunityGlobal/development #326
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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
# CONFIGURATION | |
# For help, go to https://github.com/Azure/Actions | |
# | |
# 1. Set up the following secrets in your repository: | |
# AZURE_WEBAPP_PUBLISH_PROFILE | |
# | |
# 2. Change these variables for your configuration: | |
# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions | |
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples | |
name: Build and deploy Node.js app to Azure Web App - hgn-rest-beta | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
AZURE_WEBAPP_NAME: hgn-rest-beta # set this to your application's name | |
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | |
NODE_VERSION: '14.x' # set this to the node version to use | |
jobs: | |
build-and-deploy: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
environment: | |
name: 'Production' | |
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
steps: | |
- uses: actions/checkout@master | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: npm install, build, and test | |
run: | | |
# Build and test the project, then | |
# deploy to Azure Web App. | |
npm install | |
npm run build --if-present | |
- name: 'Deploy to Azure WebApp' | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_47800FE52B59410A903D5C41C2F9C10F }} | |
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} | |
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions |