-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: 배포파일 및 테스트코드 name 분리, 테스트코드 결과 제공, 배포 성공여부 슬랙메세지 전송 (#228)
* feat: 배포파일 및 테스트코드 name 분리, 테스트코드 결과 제공 * fix: 로그 출력 축소 * fix: 간략화한 결과 및 파일은 생략, 슬랙 메시지 테스트코드 결과 전송 * fix: 분석방식 변경 * fix: 분석방식 변경 * fix: 클린테스트로 변경 및 상태경로로 수정 * fix: 클린테스트로 변경 및 상태경로로 수정 * fix: 경로 수정 * fix: pr에 테스트결과 등록되도록 수정 * feat: token에 쓰기권한 추가 * fix: 권한 없이 재시도 * refactor: 최신 버전의 action-junit-report로 업그레이드
- Loading branch information
Showing
2 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,16 +10,30 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: 📥 Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up SSH | ||
- name: 🔐 Set Up SSH Authentication | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Run deployment script on server | ||
- name: 🚀 Run Deployment Script on Server | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
run: | | ||
ssh -o StrictHostKeyChecking=no ubuntu@${{ secrets.SERVER_IP }} "SLACK_WEBHOOK_URL=${{ secrets.SLACK_WEBHOOK_URL }} bash /home/ubuntu/deploy.sh" | ||
# 서버의 deploy.sh 스크립트를 통해 무중단 배포를 진행합니다. | ||
# 무중단 배포 성공 시 Slack 알림을 전송하도록 설정되어 있습니다. | ||
|
||
- name: 📢 Notify Deployment Status on Slack | ||
if: always() | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
run: | | ||
if [ $? -eq 0 ]; then | ||
curl -X POST -H 'Content-type: application/json' --data '{"text": "🎉 *최종 배포 성공* - 배포가 성공적으로 완료되었습니다!"}' $SLACK_WEBHOOK_URL | ||
else | ||
curl -X POST -H 'Content-type: application/json' --data '{"text": "⚠️ *배포 실패* - 배포 과정에서 문제가 발생했습니다."}' $SLACK_WEBHOOK_URL | ||
fi | ||
# 배포 스크립트가 성공적으로 실행되었는지 여부를 Slack으로 알립니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters