-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.44 KB
/
cd.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
name: CD
on:
push:
tags: ["v*"]
release:
types: [published]
jobs:
build:
name: Build
uses: andrewscwei/workflows/.github/workflows/node-build.yml@master
with:
artifacts-path: build/
deploy-npm:
name: Deploy
uses: andrewscwei/workflows/.github/workflows/npm-deploy.yml@master
needs: [build]
with:
artifacts-name: ${{ needs.build.outputs.artifacts-name }}
artifacts-path: ${{ needs.build.outputs.artifacts-path }}
create-release: true
secrets:
npm-auth-token: ${{ secrets.NPM_AUTH }}
deploy-pages:
name: Deploy
uses: andrewscwei/workflows/.github/workflows/gh-pages-deploy.yml@master
needs: [build]
with:
artifacts-name: ${{ needs.build.outputs.artifacts-name }}
artifacts-path: ${{ needs.build.outputs.artifacts-path }}
predeploy-command: npm run pages
notify:
name: Notify
needs: [build, deploy-npm, deploy-pages]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- uses: andrewscwei/telegram-action@v1.0.0
with:
success: ${{ needs.build.result == 'success' && needs.deploy-npm.result == 'success' && needs.deploy-pages.result == 'success' }}
cancelled: ${{ needs.build.result == 'cancelled' || needs.deploy-npm.result == 'cancelled' || needs.deploy-pages.result == 'cancelled' }}
bot-token: ${{ secrets.TELEGRAM_DEVOPS_BOT_TOKEN }}
chat-id: ${{ secrets.TELEGRAM_DEVOPS_CHAT_ID }}