Skip to content

deploy.yml added for workflow #1

deploy.yml added for workflow

deploy.yml added for workflow #1

Workflow file for this run

name: Deploy to AWS CodeDeploy
on:
push:
branches:
- main # Adjust this to your deployment branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install AWS CLI
run: |
sudo apt-get update
sudo apt-get install -y unzip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- name: Deploy to AWS CodeDeploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
run: |
aws deploy create-deployment \
--application-name YourApplicationName \
--deployment-group-name YoutubeDemo-DG \
--deployment-config-name CodeDeployDefault.OneAtATime \
--description "Deployment from GitHub Actions" \
--github-location repository=${{ github.repository }},commitId=${{ github.sha }}