ci 2nd
This commit is contained in:
50
.github/workflows/cicd-branch-main.yml
vendored
50
.github/workflows/cicd-branch-main.yml
vendored
@@ -12,35 +12,35 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: checkout src
|
||||
- uses: actions/checkout@v2
|
||||
- name: checkout src
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod 777 gradlew
|
||||
shell: bash
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod 777 gradlew
|
||||
shell: bash
|
||||
|
||||
- name: Clean build test with Gradle # clean build test
|
||||
run: ./gradlew clean build test
|
||||
shell: bash
|
||||
- name: Clean build test with Gradle # clean build test
|
||||
run: ./gradlew clean build test
|
||||
shell: bash
|
||||
|
||||
- name: Make zip file # zip 파일 생성
|
||||
run: zip -r ./springboot-blog.zip .
|
||||
shell: bash
|
||||
- name: Make zip file # zip 파일 생성
|
||||
run: zip -r ./springboot-blog.zip .
|
||||
shell: bash
|
||||
|
||||
- name: Configure AWS credentials # AWS 자격 증명
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
- name: Configure AWS credentials # AWS 자격 증명
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
|
||||
- name: Upload to S3 # S3 업로드
|
||||
run: aws s3 cp --region ${{ secrets.AWS_REGION }} ./springboot-blog.zip s3://${{ secrets.AWS_S3_BUCKET }}/CI/springboot-blog.zip
|
||||
- name: Upload to S3 # S3 업로드
|
||||
run: aws s3 cp --region ${{ secrets.AWS_REGION }} ./springboot-blog.zip s3://${{ secrets.AWS_S3_BUCKET }}/CI/springboot-blog.zip
|
||||
|
||||
- name: Code Deploy # CodeDeploy에 배포 요청
|
||||
run: aws deploy create-deployment --application-name ${{ secrets.AWS_CODEDEPLOY_NAME }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ secrets.AWS_CODEDEPLOY_GROUP }} --s3-location bucket=${{ secrets.AWS_S3_BUCKET }},bundleType=zip,key=CI/springboot-blog.zip
|
||||
- name: Code Deploy # CodeDeploy에 배포 요청
|
||||
run: aws deploy create-deployment --application-name ${{ secrets.AWS_CODEDEPLOY_NAME }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ secrets.AWS_CODEDEPLOY_GROUP }} --s3-location bucket=${{ secrets.AWS_S3_BUCKET }},bundleType=zip,key=CI/springboot-blog.zip
|
||||
|
||||
Reference in New Issue
Block a user