Skip to content

Commit

Permalink
Update deploy-backend.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Amarjha01 authored Aug 24, 2024
1 parent 8cb9b6d commit 0427794
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,20 @@ 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:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
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

0 comments on commit 0427794

Please sign in to comment.