diff --git a/.github/workflows/CD_Prod.yml b/.github/workflows/CD_Prod.yml index dd119c6..bfb5699 100644 --- a/.github/workflows/CD_Prod.yml +++ b/.github/workflows/CD_Prod.yml @@ -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) @@ -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