diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index cadb94e3..ecac1329 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -51,8 +51,12 @@ jobs: key: ${{ secrets.EC2_SSH_PRIVATE_KEY }} envs: REGISTRY,REPOSITORY,IMAGE_TAG,AWS_REGION,IMAGE_NAME scripts: |- - sudo $(aws ecr get-login-password --region ${{ env.AWS_REGION }}) + echo "1" + sudo $(aws ecr get-login-password --region ${{ env.AWS_REGION }}); + echo "2" sudo docker stop ${{ env.IMAGE_NAME }} || true + echo "3" sudo docker rm ${{ env.IMAGE_NAME }} || true + echo "4" sudo docker pull $REGISTRY/$REPOSITORY:$IMAGE_TAG sudo docker container run --name ${{ env.IMAGE_NAME }} -d -p 3000:3000 $REGISTRY/$REPOSITORY:$IMAGE_TAG