-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (37 loc) · 1.26 KB
/
deploy-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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 }}