Skip to content

Commit

Permalink
Update and rename testCD.yml to CD.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaeAg authored Dec 20, 2023
1 parent 08d27a1 commit a0446b5
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/testCD.yml → .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,6 +33,8 @@ jobs:
working-directory: ${{ env.working-directory }}
shell: bash

######## 여기까지는 CI.yaml과 동일 #########

- name: docker build 가능하도록 환경 설정
uses: docker/[email protected]

Expand All @@ -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: 도커 컨테이너 실행
Expand All @@ -59,5 +64,5 @@ jobs:
username: ${{ secrets.RELEASE_SERVER_USER }}
key: ${{ secrets.RELEASE_SERVER_KEY }}
script: |
cd ~
./deploy.sh
cd ~
./deploy.sh

0 comments on commit a0446b5

Please sign in to comment.