README 크램폴린 링크를 ec2로 변경 (#142) #13
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
name: Java CD on AWS EC2 with SSH Connection | |
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 # 기존 서버 종료 후 백그라운드로 서버 실행 |