Skip to content

fix: code deploy cli #4

fix: code deploy cli

fix: code deploy cli #4

Workflow file for this run

name: AWS example workflow
on:
push
env:
AWS_REGION : "ap-northeast-2"
ROLE_NAME : "arn:aws:iam::582765306680:role/github-actions-role"
REPOSITORY_NAME : "aws-github-actions-011624"
BUCKET_NAME : "aws-github-actions-011624"
CODEDEPLOY_APP_NAME : "aws-github-actions-011624"
DEPLOYMENT_GROUP_NAME : "aws-github-actions-011624"
permissions:
id-token: write
contents: read
jobs:
Deloy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.ROLE_NAME }}
aws-region: ${{ env.AWS_REGION }}
- name: Make .zip
run: |
zip -r deployment_package.zip .
- name: Upload .zip to Amazon S3
run: |
aws s3 cp deployment_package.zip s3://${{ env.BUCKET_NAME }}/${{ github.run_id }}.zip
- name: Create deployment to AWS CodeDeploy
run: |
aws deploy create-deployment \
--application-name ${{ env.CODEDEPLOY_APP_NAME }} \
--deployment-config-name CodeDeployDefault.OneAtATime \
--deployment-group-name ${{ env.DEPLOYMENT_GROUP_NAME }} \
--s3-location bucket=${{ env.BUCKET_NAME }},bundleType=zip,key=${{ github.run_id }}.zip \