From 0427794b90f108956211ec4941c5ecc494c2c42c Mon Sep 17 00:00:00 2001 From: AMAR Date: Sat, 24 Aug 2024 23:56:55 +0530 Subject: [PATCH] Update deploy-backend.yml --- .github/workflows/deploy-backend.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-backend.yml b/.github/workflows/deploy-backend.yml index e58ea21..a55e25d 100644 --- a/.github/workflows/deploy-backend.yml +++ b/.github/workflows/deploy-backend.yml @@ -44,11 +44,12 @@ jobs: - name: Prepare source bundle for Elastic Beanstalk run: | + # Create a directory for deployment and copy necessary files mkdir -p eb-deploy - cp backend/Dockerfile eb-deploy/Dockerfile - cp -r backend/* eb-deploy/ + cp backend/Dockerfile eb-deploy/Dockerfile # Copy Dockerfile to root of deployment directory + cp -r backend/* eb-deploy/ # Copy backend files to deployment directory cd eb-deploy - zip -r ../app.zip . + zip -r ../app.zip . # Zip the deployment directory - name: Deploy to Elastic Beanstalk env: @@ -56,6 +57,7 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_REGION: ap-south-1 run: | + # Initialize Elastic Beanstalk environment and deploy the application eb init -p docker my-backend-app --region $AWS_REGION eb use my-backend-app-env eb deploy --staged