diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-deploy.yml index 0586a64..860fd33 100644 --- a/.github/workflows/dev-deploy.yml +++ b/.github/workflows/dev-deploy.yml @@ -93,10 +93,11 @@ jobs: container-name: ${{ env.CONTAINER_NAME }} image: ${{ steps.build-image.outputs.image }} - - name: Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def.outputs.task-definition }} - service: ${{ env.ECS_SERVICE }} - cluster: ${{ env.ECS_CLUSTER }} - wait-for-service-stability: true \ No newline at end of file + - name: Register new ECS task definition with CodeDeploy + uses: aws-actions/aws-cli-action@v1 + run: | + aws ecs update-service \ + --cluster ${{ env.ECS_CLUSTER }} \ + --service ${{ env.ECS_SERVICE }} \ + --task-definition ${{ steps.task-def.outputs.task-definition }} \ + --deployment-controller type=CODE_DEPLOY \ No newline at end of file diff --git a/appspec.yaml b/appspec.yaml new file mode 100644 index 0000000..e6f053e --- /dev/null +++ b/appspec.yaml @@ -0,0 +1,9 @@ +version: 0.0 +Resources: + - TargetService: + Type: AWS::ECS::Service + Properties: + TaskDefinition: "arn:aws:ecs:ap-northeast-2:202533511551:task/ChunsikDevCluster/c8ee01484acd41d2a61c98d754b007d1:3" + LoadBalancerInfo: + ContainerName: "dev-fe-container" + ContainerPort: 3000 \ No newline at end of file