Skip to content

[fix] private key에서 -----~~-----을 지웠던 것을 다시 지운다 #6

[fix] private key에서 -----~~-----을 지웠던 것을 다시 지운다

[fix] private key에서 -----~~-----을 지웠던 것을 다시 지운다 #6

Workflow file for this run

name: Github Actions Workflow - StockOneQ Back
on:
push:
branches: [ feature/#117 ]
jobs:
build:
name: StockOneQ CI & CD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
- name: Make Directory for deliver
run: mkdir deploy && mkdir deploy/scripts
- name: Configure AWS credentials
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: ap-northeast-2
- name: Copy Jar
run: cp ./build/libs/*.jar ./deploy/
- name: Copy script
run: cp ./scripts/*.sh ./deploy/scripts/
- name: Copy appspec.yml
run: cp ./appspec.yml ./deploy/
- name: Make zip file
run: zip -r -qq -j ./$GITHUB_SHA.zip ./deploy
- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://stockoneq-back-jar-2/$GITHUB_SHA.zip
- name: Code Deploy
run: |
aws deploy create-deployment \
--deployment-config-name CodeDeployDefault.AllAtOnce \
--application-name ${{ secrets.CODE_DEPLOY_APPLICATION_NAME }} \
--deployment-group-name ${{ secrets.CODE_DEPLOY_DEPLOYMENT_GROUP_NAME }} \
--file-exists-behavior OVERWRITE \
--s3-location bucket=stockoneq-back-jar-2,bundleType=zip,key=$GITHUB_SHA.zip