rename master to main #80
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
# This action will deploy the app to the dev environment once new code is pushed on main. | |
name: Deploy to Development | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
AZURE_WEBAPP_NAME: gccollab-dev | |
AZURE_WEBAPP_PACKAGE_PATH: './dist/gccollab-frontend' | |
NODE_VERSION: '16.14.2' | |
jobs: | |
build-test-and-deploy: | |
name: Build, Test and Deploy to Development | |
runs-on: windows-latest | |
if: ${{ !contains(github.event.head_commit.message, vars.IGNORE_DEPLOY) }} | |
environment: | |
name: Development | |
url: https://${{ env.AZURE_WEBAPP_NAME }}.azurewebsites.net/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install | |
run: npm install | |
- name: Build | |
run: npm run build-dev --if-present | |
- name: Test | |
run: npm run test --if-present -- --watch=false --browsers=ChromeHeadless | |
- 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 }} |