Skip to content

Create README.md

Create README.md #9

Workflow file for this run

name: deploy-to-eb
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create ZIP deployment package
run: zip -r deploy_urlshortener_package.zip ./
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }}
aws-region: "ap-south-1"
- name: Upload package to S3 bucket
run: aws s3 cp deploy_urlshortener_package.zip s3://deploywala/
- name: Create new ElasticBeanstalk Application Version
run: |
aws elasticbeanstalk create-application-version \
--application-name url-shortener \
--source-bundle S3Bucket="deploywala",S3Key="deploy_urlshortener_package.zip" \
--version-label "ver-${{ github.sha }}" \
--description "commit-sha-${{ github.sha }}"
- name: Deploy new ElasticBeanstalk Application Version
run: aws elasticbeanstalk update-environment --environment-name Url-shortener-env --version-label "ver-${{ github.sha }}"