Skip to content

fix : lock timeout 문제 해결, facade 패턴으로 트랜잭션 분리 #30

fix : lock timeout 문제 해결, facade 패턴으로 트랜잭션 분리

fix : lock timeout 문제 해결, facade 패턴으로 트랜잭션 분리 #30

name: coffee-prod-deploy
on:
workflow_dispatch:
push:
branches: [ "main", "release/*" ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
# 서버에 파일 복사 (빌드된 JAR 배포)
- name: Deploy to Server1
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }} # 서버 IP
username: ${{ secrets.SERVER_USER }} # 서버 사용자 이름
password: ${{ secrets.SERVER_PASSWORD }} # 서버 비밀번호
source: build/libs/*.jar
target: /app
- name: Deploy to Server2
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST2 }} # 서버 IP
username: ${{ secrets.SERVER_USER }} # 서버 사용자 이름
password: ${{ secrets.SERVER_PASSWORD }} # 서버 비밀번호
source: build/libs/*.jar
target: /app
# Spring Boot 애플리케이션 실행 (Optional)
- name: Restart Spring Boot Application
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SERVER_PASSWORD }}
script: |
/app/deploy.sh
- name: Restart Spring Boot Application2
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST2 }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SERVER_PASSWORD }}
script: |
/app/deploy.sh