Skip to content

[chore] 로그 추가 #21

[chore] 로그 추가

[chore] 로그 추가 #21

Workflow file for this run

name: Reserving CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
env:
S3_BUCKET_NAME: ssafy-otd-codedeploy
AWS_REGION: ap-northeast-2
CODEDEPLOY_NAME: ssafy-otd-codedeploy
CODEDEPLOY_GROUP: ssafy-otd-reservation-service-group
TARGET_PROJECT: reserving
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Setup Node version
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Make zip file
run: zip -r ./$GITHUB_SHA.zip .
- name: Configure AWS credential
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{ env.AWS_REGION }}
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
- name: Upload to S3
run: aws s3 cp --region $AWS_REGION ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$TARGET_PROJECT/$GITHUB_SHA.zip
- name: Code Deploy
run: |
aws deploy create-deployment \
--application-name $CODEDEPLOY_NAME \
--deployment-config-name CodeDeployDefault.AllAtOnce \
--deployment-group-name $CODEDEPLOY_GROUP \
--s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=$TARGET_PROJECT/$GITHUB_SHA.zip