|
4 | 4 | name: CD process to deploy to App-Service service |
5 | 5 |
|
6 | 6 | on: |
7 | | - push: |
8 | | - branches: |
9 | | - - 47-notify-deployments |
10 | 7 | # 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 |
15 | 12 |
|
16 | 13 | jobs: |
17 | 14 | build-and-deploy: |
18 | 15 | name: Deploy to Azure |
19 | 16 | runs-on: ubuntu-latest |
20 | 17 | timeout-minutes: 60 |
21 | 18 | 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 |
49 | 46 |
|
50 | 47 | - uses: actions/checkout@v2 |
51 | 48 | - name: Slack Notification |
52 | 49 | |
53 | 50 | env: |
54 | 51 | SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
55 | 52 | SLACK_ICON: https://avatars.slack-edge.com/2020-04-14/1055222096486_7b0bf047c32f9f666b69_48.jpg |
56 | | - SLACK_TITLE: 'New deployment' |
| 53 | + SLACK_TITLE: 'Guess what?' |
57 | 54 | SLACK_USERNAME: 'heisenberg-says:' |
58 | 55 | SLACK_MESSAGE: 'A new deployment has been executed successfully' |
0 commit comments