From 7021279505c12548b6f4cf159b13588e6f6a4d4f Mon Sep 17 00:00:00 2001 From: ShafathZ Date: Fri, 1 May 2026 13:51:01 -0400 Subject: [PATCH 1/4] Added AWS ECS deploy github action, testing soon --- .github/workflows/aws_ecs_deploy.yml | 63 ++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/aws_ecs_deploy.yml diff --git a/.github/workflows/aws_ecs_deploy.yml b/.github/workflows/aws_ecs_deploy.yml new file mode 100644 index 0000000..b994ace --- /dev/null +++ b/.github/workflows/aws_ecs_deploy.yml @@ -0,0 +1,63 @@ +name: Deploy to AWS ECS + +on: + push: + branches: + - production + workflow_dispatch: + +env: + # Configurable constants for deployment + AWS_REGION: us-east-2 + ECR_REPOSITORY: anizenith/anizenith-repo + ECS_CLUSTER: anizenith-cluster + ECS_SERVICE: AniZenith-Single-Container-Deployment-Service + IMAGE_TAG: latest + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Configure AWS credentials + # Special GitHub-native aws actions build which allows specifying keys directly + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ env.AWS_REGION }} + + - name: Login to Amazon ECR + run: | + aws ecr get-login-password --region $AWS_REGION \ + | docker login \ + --username AWS \ + --password-stdin ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com + + - name: Build Docker image + # Builds Docker Image like: ecr_repo:latest + run: | + docker build -t $ECR_REPOSITORY:$IMAGE_TAG . + + - name: Tag image for ECR + # Tags Docker image ecr_repo:latest --> AWS ECR Access IP (Required for pushing) + run: | + docker tag $ECR_REPOSITORY:$IMAGE_TAG \ + ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com/$ECR_REPOSITORY:$IMAGE_TAG + + - name: Push image to ECR + run: | + docker push \ + ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com/$ECR_REPOSITORY:$IMAGE_TAG + + - name: Force new ECS deployment + # Updates service to force new deployment with desired tasks count to 1 + run: | + aws ecs update-service \ + --cluster $ECS_CLUSTER \ + --service $ECS_SERVICE \ + --desired-count 1 \ + --force-new-deployment \ No newline at end of file From b101c71c26065596472dbe292536ba553f2d807f Mon Sep 17 00:00:00 2001 From: ShafathZ Date: Fri, 1 May 2026 13:53:52 -0400 Subject: [PATCH 2/4] Moved hf sync to archived --- {.github/workflows => archived}/hf_sync.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.github/workflows => archived}/hf_sync.yml (100%) diff --git a/.github/workflows/hf_sync.yml b/archived/hf_sync.yml similarity index 100% rename from .github/workflows/hf_sync.yml rename to archived/hf_sync.yml From 99258e3a760f4ceb33196d296c17a87be302b7a4 Mon Sep 17 00:00:00 2001 From: ShafathZ Date: Fri, 1 May 2026 13:56:58 -0400 Subject: [PATCH 3/4] Set to run on any push temporarily --- .github/workflows/aws_ecs_deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aws_ecs_deploy.yml b/.github/workflows/aws_ecs_deploy.yml index b994ace..8bac251 100644 --- a/.github/workflows/aws_ecs_deploy.yml +++ b/.github/workflows/aws_ecs_deploy.yml @@ -2,8 +2,8 @@ name: Deploy to AWS ECS on: push: - branches: - - production +# branches: +# - production workflow_dispatch: env: From b9e6db26feb123a6764ea11315281838f5268037 Mon Sep 17 00:00:00 2001 From: ShafathZ Date: Fri, 1 May 2026 14:03:02 -0400 Subject: [PATCH 4/4] Uncommented branch specific deploy --- .github/workflows/aws_ecs_deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aws_ecs_deploy.yml b/.github/workflows/aws_ecs_deploy.yml index 8bac251..b994ace 100644 --- a/.github/workflows/aws_ecs_deploy.yml +++ b/.github/workflows/aws_ecs_deploy.yml @@ -2,8 +2,8 @@ name: Deploy to AWS ECS on: push: -# branches: -# - production + branches: + - production workflow_dispatch: env: