Skip to content

Commit

Permalink
feat: deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Seokyeong237 committed Jan 19, 2024
1 parent 9d0c7ac commit e5038a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@ jobs:
run: |
docker buildx build --platform=linux/amd64 -t $ECR_REGISTRY/$ECR_REPOSITORY .
docker push $ECR_REGISTRY/$ECR_REPOSITORY
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY"
# S3에 업로드
- name: Upload to s3
run:
aws s3 cp --region ap-northeast-2 ./fullcar.zip s3://fullcar-build/deploy/

# Deploy 시작
- name: Deploy with AWS codeDeploy
run: |
aws deploy create-deployment --application-name fullcar-codedeploy
--deployment-config-name CodeDeployDefault.OneAtATime
--deployment-group-name DEPLOY-GROUP
--s3-location bucket=fullcar-build,bundleType=zip,key=deploy/fullcar.zip
2 changes: 1 addition & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ $(aws ecr get-login --region ap-northeast-2 --no-include-email)
sudo docker rm -f codedeploy
sudo docker rmi "$ECR_REPOSITORY"
sudo docker pull "$ECR_REPOSITORY"
sudo docker run -d --name codedeploy -p 8080:80 "$ECR_REPOSITORY"
sudo docker run -d --name codedeploy -p 8080:80 --restart always "$ECR_REPOSITORY"

0 comments on commit e5038a3

Please sign in to comment.