Skip to content

Merge pull request #151 from 2024-SummerBootcamp-Team/develop #43

Merge pull request #151 from 2024-SummerBootcamp-Team/develop

Merge pull request #151 from 2024-SummerBootcamp-Team/develop #43

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: envs
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/[email protected]
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2
- name: Upload to AWS S3
run: |
aws deploy push \
--application-name ${{ vars.CODE_DEPLOY_APPLICATION_NAME }} \
--ignore-hidden-files \
--s3-location s3://${{ vars.S3_BUCKET_NAME }}/$GITHUB_SHA.zip \
--source .
- name: Deploy to AWS CodeDeploy
run: |
aws deploy create-deployment \
--application-name ${{ vars.CODE_DEPLOY_APPLICATION_NAME }} \
--deployment-group-name ${{ vars.CODE_DEPLOY_DEPLOYMENT_GROUP_NAME }} \
--s3-location bucket=${{ vars.S3_BUCKET_NAME }},key=$GITHUB_SHA.zip,bundleType=zip