Skip to content

Commit a3337fe

Browse files
committed
feat: Discord 배포 알림 추가 및 메시지 개선
1 parent 27c4ea6 commit a3337fe

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

.github/workflows/cicd-on-prem.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: build & deploy to mac-mini
22

3-
on :
3+
on:
44
workflow_dispatch:
55
push:
66
branches:
@@ -10,7 +10,7 @@ on :
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13-
13+
1414
steps:
1515
- name: checkout repository
1616
uses: actions/checkout@v4
@@ -63,4 +63,30 @@ jobs:
6363
script: |
6464
cd guesthouse/jeju
6565
sh deploy.sh
66-
66+
67+
- name: Discord 배포 성공 알림
68+
if: success()
69+
uses: sarisia/actions-status-discord@v1
70+
with:
71+
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
72+
status: success
73+
title: "서버 배포 완료"
74+
description: |
75+
브랜치: `${{ github.ref_name }}`
76+
커밋: ${{ github.event.head_commit.message }}
77+
배포자: ${{ github.actor }}
78+
color: 0x00FF00
79+
80+
- name: Discord 배포 실패 알림
81+
if: failure()
82+
uses: sarisia/actions-status-discord@v1
83+
with:
84+
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
85+
status: failure
86+
title: "서버 배포 실패"
87+
description: |
88+
브랜치: `${{ github.ref_name }}`
89+
커밋: ${{ github.event.head_commit.message }}
90+
배포자: ${{ github.actor }}
91+
워크플로우를 확인해주세요!
92+
color: 0xFF0000

0 commit comments

Comments
 (0)