Skip to content

Commit

Permalink
Merge pull request #43 from MYONGSIK/infra/ci-test
Browse files Browse the repository at this point in the history
[infra/ci-test] PROD2 서버 배포 시 로그인 스크립트 추가
  • Loading branch information
dldmsql authored Feb 7, 2023
2 parents 25caf6e + c07c65a commit 52bc635
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CD_Prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ jobs:
- name: docker build and push
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -f Dockerfile -t myongsik_prod1 .
docker tag myongsik_prod1 ${{ secrets.DOCKER_USERNAME }}/myongsik
docker build -f Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/myongsik .
docker push ${{ secrets.DOCKER_USERNAME }}/myongsik
# 9) Deploy (PROD1)
Expand All @@ -90,6 +89,7 @@ jobs:
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_KEY }}
script: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker stop myongsik_prod2
docker rm myongsik_prod2
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/myongsik
Expand Down

0 comments on commit 52bc635

Please sign in to comment.