diff --git a/.github/workflows/testCD.yml b/.github/workflows/CD.yml similarity index 75% rename from .github/workflows/testCD.yml rename to .github/workflows/CD.yml index 3f633f2..e8e4a12 100644 --- a/.github/workflows/testCD.yml +++ b/.github/workflows/CD.yml @@ -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/setup-buildx-action@v2.9.1 @@ -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