Skip to content

Commit

Permalink
merge: 백엔드 배포 스크립트 수정
Browse files Browse the repository at this point in the history
fix/#90 백엔드 배포 스크립트 수정
  • Loading branch information
hong-sile authored Jul 25, 2023
2 parents 4d20aa5 + f25fd5a commit 89f5d6e
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/backend-dev-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ name: Kerdy Backend Dev Server CI/CD
on:
workflow_dispatch:

defaults:
run:
working-directory: backend/emm-sale

permissions:
contents: read

jobs:
build-and-upload:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: backend/emm-sale
services:
mysql:
image: mysql:8.0.28
Expand Down Expand Up @@ -61,7 +60,7 @@ jobs:
cp keystore.p12 src/main/resources/ssl
- name: gradle 빌드
run: ./gradlew build
run: ./gradlew clean build

- name: 디버깅용 경로 출력
id: cp-keystore
Expand All @@ -72,25 +71,23 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: BackendApplicationJar
path: ./build/libs/*.jar
path: backend/emm-sale/build/libs/*.jar

deploy:
runs-on: self-hosted
needs: build-and-upload
steps:
- name: 구버전 jar 삭제
working-directory: ./backend/build/
run: rm -f kerdy-*.jar
run: rm -rf /home/ubuntu/backend/build/emm-sale-*.jar

- name: artifact에서 jar파일 다운 받기
uses: actions/download-artifact@v3
with:
name: BackendApplicationJar
path: backend/build/
path: /home/ubuntu/backend/build/

- name: 배포하기
working-directory: ./backend/build/
run: |
./deploy.sh
run: /home/ubuntu/backend/build/deploy.sh

- name: 슬랙 메시지 보내기
uses: 8398a7/action-slack@v3
Expand Down

0 comments on commit 89f5d6e

Please sign in to comment.