-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename testCD.yml to CD.yml
- Loading branch information
Showing
1 changed file
with
13 additions
and
8 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 |
---|---|---|
|
@@ -2,16 +2,17 @@ name: CD | |
|
||
on: | ||
push: | ||
branches: [ "deploy-test" ] | ||
branches: [ "develop" ] | ||
|
||
jobs: | ||
deploy-ci: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
working-directory: ThirdSeminar | ||
working-directory: Second Seminar/SecondSeminar | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 체크아웃 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
|
@@ -32,6 +33,8 @@ jobs: | |
working-directory: ${{ env.working-directory }} | ||
shell: bash | ||
|
||
######## 여기까지는 CI.yaml과 동일 ######### | ||
|
||
- name: docker build 가능하도록 환경 설정 | ||
uses: docker/[email protected] | ||
|
||
|
@@ -43,13 +46,15 @@ jobs: | |
|
||
- name: docker image 빌드 및 푸시 | ||
run: | | ||
docker build --platform linux/amd64 -t chaeag/do-sopt-seminar . | ||
docker push {dockerhub계정id}/do-sopt-seminar | ||
docker build --platform linux/amd64 -t sunseo18/do-sopt-seminar . | ||
docker push sunseo18/do-sopt-seminar | ||
working-directory: ${{ env.working-directory }} | ||
|
||
deploy-cd: | ||
needs: deploy-ci | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-20.04 | ||
|
||
######## 여기까지는 기존 CD.yaml과 동일 ######### | ||
|
||
steps: | ||
- name: 도커 컨테이너 실행 | ||
|
@@ -59,5 +64,5 @@ jobs: | |
username: ${{ secrets.RELEASE_SERVER_USER }} | ||
key: ${{ secrets.RELEASE_SERVER_KEY }} | ||
script: | | ||
cd ~ | ||
./deploy.sh | ||
cd ~ | ||
./deploy.sh |