Skip to content

Commit 21a5c0e

Browse files
committed
fix: #47 adding slack interaction after deployments
1 parent f503f57 commit 21a5c0e

File tree

1 file changed

+32
-35
lines changed

1 file changed

+32
-35
lines changed

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

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,52 @@
44
name: CD process to deploy to App-Service service
55

66
on:
7-
push:
8-
branches:
9-
- 47-notify-deployments
107
# Trigger the workflow on pull request but only for the master branch
11-
# pull_request:
12-
# types: [closed]
13-
# branches:
14-
# - master
8+
pull_request:
9+
types: [closed]
10+
branches:
11+
- master
1512

1613
jobs:
1714
build-and-deploy:
1815
name: Deploy to Azure
1916
runs-on: ubuntu-latest
2017
timeout-minutes: 60
2118
steps:
22-
# - name: Checkout of master
23-
# uses: actions/checkout@master
24-
25-
# - name: Set up Node.js version
26-
# uses: actions/setup-node@v1
27-
# with:
28-
# node-version: '12.x'
29-
30-
# - name: Inject Secrets
31-
# env:
32-
# SCOPES: ${{ secrets.scopes }}
33-
# CLIENT_ID: ${{ secrets.client_id }}
34-
# AUTHORITY: ${{ secrets.authority }}
35-
# run: sudo sh scripts/populate-keys.sh
36-
37-
# - name: 'run: npm install and build'
38-
# run: |
39-
# npm install
40-
# npm run build --prod --if-present
41-
42-
# - name: 'Deploy to Azure Web App'
43-
# uses: azure/webapps-deploy@v1
44-
# with:
45-
# app-name: 'time-tracker-ui'
46-
# slot-name: 'production'
47-
# publish-profile: ${{ secrets.AzureAppService_PublishProfile_728dc744f9384bf38e8a0446aaaee29d }}
48-
# package: dist/time-tracker
19+
- name: Checkout of master
20+
uses: actions/checkout@master
21+
22+
- name: Set up Node.js version
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: '12.x'
26+
27+
- name: Inject Secrets
28+
env:
29+
SCOPES: ${{ secrets.scopes }}
30+
CLIENT_ID: ${{ secrets.client_id }}
31+
AUTHORITY: ${{ secrets.authority }}
32+
run: sudo sh scripts/populate-keys.sh
33+
34+
- name: 'run: npm install and build'
35+
run: |
36+
npm install
37+
npm run build --prod --if-present
38+
39+
- name: 'Deploy to Azure Web App'
40+
uses: azure/webapps-deploy@v1
41+
with:
42+
app-name: 'time-tracker-ui'
43+
slot-name: 'production'
44+
publish-profile: ${{ secrets.AzureAppService_PublishProfile_728dc744f9384bf38e8a0446aaaee29d }}
45+
package: dist/time-tracker
4946

5047
- uses: actions/checkout@v2
5148
- name: Slack Notification
5249
uses: rtCamp/[email protected]
5350
env:
5451
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
5552
SLACK_ICON: https://avatars.slack-edge.com/2020-04-14/1055222096486_7b0bf047c32f9f666b69_48.jpg
56-
SLACK_TITLE: 'New deployment'
53+
SLACK_TITLE: 'Guess what?'
5754
SLACK_USERNAME: 'heisenberg-says:'
5855
SLACK_MESSAGE: 'A new deployment has been executed successfully'

0 commit comments

Comments
 (0)