Skip to content

Commit

Permalink
#Git_Hub Actions 백그라운드 종료가아닌 실행으로 변경 nohup
Browse files Browse the repository at this point in the history
  • Loading branch information
rlawltjd8547 committed Feb 3, 2025
1 parent 0f64568 commit 87a41ad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ jobs:
- name: Deploy to NCP Server # 서버 알고리즘 변경 필요 # 서버에는 공개키 등록하기
run: |
sudo apt-get install -y sshpass # sshpass 설치 (비밀번호 입력 자동화)
sudo apt-get install -y sshpass # sshpass 설치
# 파일 전송 (scp)
sshpass -p "${{ secrets.SERVER_PASSWORD }}" scp -o StrictHostKeyChecking=no board/build/libs/board-0.0.1-SNAPSHOT.jar [email protected]:/java
sshpass -p "${{ secrets.SERVER_PASSWORD }}" scp -o StrictHostKeyChecking=no board/build/libs/board-0.0.1-SNAPSHOT.jar [email protected]:/java
# 서버에서 .jar 실행 (ssh)
sshpass -p "${{ secrets.SERVER_PASSWORD }}" ssh -o StrictHostKeyChecking=no [email protected] 'java -jar /java/board-0.0.1-SNAPSHOT.jar' # the publishing section of your build.gradle
# 서버에서 .jar 실행 (nohup + & 추가)
sshpass -p "${{ secrets.SERVER_PASSWORD }}" ssh -o StrictHostKeyChecking=no [email protected] 'nohup java -jar /java/board-0.0.1-SNAPSHOT.jar > /java/board.log 2>&1 &'
- name: Publish to GitHub Packages
run: ./gradlew publish
env:
Expand Down

0 comments on commit 87a41ad

Please sign in to comment.