-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
31 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 |
---|---|---|
@@ -1,29 +1,29 @@ | ||
name: Java CD on AWS EC2 with SSH Connection | ||
# name: Java CD on AWS EC2 with SSH Connection | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
# on: | ||
# push: | ||
# branches: | ||
# - 'master' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SSH Remote Commands | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.REMOTE_IP }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
port: 22 | ||
script: | | ||
cd Team3_BE | ||
git pull | ||
./gradlew clean build || exit 1 # 빌드 실패 시 스크립트 종료 | ||
# 환경변수 설정 | ||
set -a | ||
source .env | ||
set +a | ||
./nohup.sh # 기존 서버 종료 후 백그라운드로 서버 실행 | ||
# jobs: | ||
# deploy: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: SSH Remote Commands | ||
# uses: appleboy/[email protected] | ||
# with: | ||
# host: ${{ secrets.REMOTE_IP }} | ||
# username: ${{ secrets.REMOTE_USER }} | ||
# password: ${{ secrets.SSH_PASSWORD }} | ||
# port: 22 | ||
# script: | | ||
# cd Team3_BE | ||
# git pull | ||
# ./gradlew clean build || exit 1 # 빌드 실패 시 스크립트 종료 | ||
|
||
# # 환경변수 설정 | ||
# set -a | ||
# source .env | ||
# set +a | ||
|
||
# ./nohup.sh # 기존 서버 종료 후 백그라운드로 서버 실행 |
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