Skip to content

Commit a3e997d

Browse files
committed
Refacto CD process
1 parent 82ef25c commit a3e997d

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/CD-time-tracker-ui.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
22
# More GitHub Actions for Azure: https://github.com/Azure/actions
33

4-
name: Build and deploy Node.js app to Azure Web App - time-tracker-ui
4+
name: CD process to deploy to App-Service service
55

66
on:
7-
push:
7+
# Trigger the workflow on pull request but only for the master branch
8+
pull_request:
9+
types: [closed]
810
branches:
911
- master
1012

1113
jobs:
1214
build-and-deploy:
15+
name: Deploy to Azure
1316
runs-on: ubuntu-latest
14-
17+
timeout-minutes: 60
1518
steps:
16-
- uses: actions/checkout@master
19+
- name: Checkout of master
20+
uses: actions/checkout@master
1721

1822
- name: Set up Node.js version
1923
uses: actions/setup-node@v1
2024
with:
2125
node-version: '12.x'
2226

23-
- name: npm install, build, and test
27+
- name: 'run: npm install and build'
2428
run: |
2529
npm install
26-
npm run build --if-present
27-
# npm run test --if-present
30+
npm run build --prod --if-present
2831
2932
- name: 'Deploy to Azure Web App'
3033
uses: azure/webapps-deploy@v1

0 commit comments

Comments
 (0)