diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e3c6e6a..39dc01a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,8 +36,17 @@ jobs: - name: Copy Jar run: cp ./build/libs/*.jar ./deploy + # appspec.yml 파일 복사 + - name: Copy appspec.yml + run: cp appspec.yml ./deploy + + + # script files 복사 + - name: Copy script + run: cp ./scripts/*.sh ./deploy + - name: Make zip file - run: zip -r ./golab.zip ./deploy + run: zip -r ./coinTalk.zip ./deploy shell: bash - name: Configure AWS credentials @@ -48,4 +57,19 @@ jobs: aws-region: ap-northeast-2 - name: Upload to S3 - run: aws s3 cp --region ap-northeast-2 ./golab.zip s3://$S3_BUCKET_NAME/ + run: aws s3 cp --region ap-northeast-2 ./coinTalk.zip s3://$S3_BUCKET_NAME/ + + + + # Deploy + - name: Deploy + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + run: | + aws deploy create-deployment \ + --application-name golab \ + --deployment-group-name golab-group \ + --file-exists-behavior OVERWRITE \ + --s3-location bucket=golabgolab,bundleType=zip,key=golab.zip[S3버킷 속 압축파일] \ + --region ap-northeast-2