File tree 2 files changed +46
-5
lines changed
2 files changed +46
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : Discord PR Notification
2
+
3
+ on :
4
+ pull_request :
5
+ types : [opened, reopened]
6
+
7
+ jobs :
8
+ notify_discord :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v2
13
+
14
+ - name : Discord Notification
15
+ env :
16
+ DISCORD_WEBHOOK : ${{ secrets.DISCORD_PR_WEBHOOK }}
17
+ uses : Ilshidur/action-discord@master
18
+ with :
19
+ args : ' 새로운 PR이 열렸습니다! @이광훈 @배지훈 \nPR: ${{ github.event.pull_request.html_url }}\n작성자: ${{ github.event.pull_request.user.login }}\n제목: ${{ github.event.pull_request.title }}'
Original file line number Diff line number Diff line change 7
7
build :
8
8
runs-on : ubuntu-20.04
9
9
steps :
10
- - name : Checkout source code.
10
+ - name : Checkout source code
11
11
uses : actions/checkout@v3
12
-
12
+
13
13
- name : Install dependencies
14
14
run : yarn install
15
-
15
+
16
16
- name : Generate build
17
17
run : yarn build
18
-
19
- - name : Deploy
18
+
19
+ - name : Deploy to S3
20
+ id : deploy
20
21
env :
21
22
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
22
23
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
23
24
run : |
24
25
aws s3 sync --region ap-northeast-2 dist s3://alignlab-client --delete
26
+ continue-on-error : true
27
+
28
+ - name : Discord notification - Success
29
+ if : steps.deploy.outcome == 'success'
30
+ env :
31
+ DISCORD_WEBHOOK : ${{ secrets.DISCORD_DEPLOY_WEBHOOK }}
32
+ uses : Ilshidur/action-discord@master
33
+ with :
34
+ args : " 🎉 배포가 성공적으로 완료되었습니다! 브랜치: develop"
35
+
36
+ - name : Discord notification - Failure
37
+ if : steps.deploy.outcome == 'failure'
38
+ env :
39
+ DISCORD_WEBHOOK : ${{ secrets.DISCORD_DEPLOY_WEBHOOK }}
40
+ uses : Ilshidur/action-discord@master
41
+ with :
42
+ args : " ❌ 배포 중 오류가 발생했습니다. 브랜치: develop"
43
+
44
+ - name : Check deploy result
45
+ if : steps.deploy.outcome == 'failure'
46
+ run : exit 1
You can’t perform that action at this time.
0 commit comments