-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MATE-82 : [FEAT] 깃허브 액션을 사용한 CI/CD 구축 (#71)
* MATE-82 : [FEAT] 깃허브 액션을 사용한 CI/CD 구축 * MATE-82 : [FEAT] yml 파일 이름 수정 * MATE-82 : [FEAT] deploy.yml 수정
- Loading branch information
Showing
3 changed files
with
32 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Deploy To EC2 | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SSH로 EC2에 접속하기 | ||
uses: appleboy/[email protected] | ||
env: | ||
APPLICATION_PROPERTIES: ${{ secrets.APPLICATION_PROPERTIES }} | ||
with: | ||
host: ${{ secrets.EC2_HOST }} | ||
username: ${{ secrets.EC2_USERNAME }} | ||
key: ${{ secrets.EC2_PRIVATE_KEY }} | ||
envs: APPLICATION_PROPERTIES | ||
script_stop: true | ||
script: | | ||
cd /home/ubuntu/WEB1_2_PitchingMate_BE | ||
git pull origin develop | ||
echo "$APPLICATION_PROPERTIES" > src/main/resources/application-dev.yml | ||
./gradlew clean build | ||
sudo fuser -k -n tcp 8080 || true | ||
nohup java -jar build/libs/*SNAPSHOT.jar > ./output.log 2>&1 & |
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
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,7 +1,7 @@ | ||
spring: | ||
profiles: | ||
group: | ||
develop: | ||
production: | ||
develop: dev, common | ||
production: prod, common | ||
local: local, common | ||
active: local | ||
active: ${SPRING_PROFILES_ACTIVE:develop} |