[hotfix] 내 댓글 조회 기능 수정 #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: kuddy-server | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "develop" ] | |
env: # 현재 스크립트에서 사용할 환경변수 정의 | |
S3_BUCKET_NAME: onezerobucket | |
PROJECT_NAME: kuddy-server | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout # 깃헙이 제공하는 워크스페이스 (이 workflow 를 실행하는 공간) 에서 내 저장소가 위치한 곳으로 이동 | |
uses: actions/checkout@v3 | |
- name: Set up JDK 11 # java 셋업 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Grant execute permission for gradlew # gradlew에 실행권한 | |
run: chmod +x ./gradlew | |
shell: bash | |
- name: Decode application.yml for api-server | |
run: echo "${{ secrets.API_APPLICATION }}" | base64 -d > ./api-server/src/main/resources/application.yml | |
- name: Decode application.yml for chat-server | |
run: echo "${{ secrets.CHAT_APPLICATION }}" | base64 -d > ./chat-server/src/main/resources/application.yml | |
- name: Decode application.yml for noti-server | |
run: echo "${{ secrets.NOTI_APPLICATION }}" | base64 -d > ./noti-server/src/main/resources/application.yml | |
- name: Build with Gradle # 프로젝트 build | |
run: ./gradlew clean build -x test | |
shell: bash | |
- name: Make zip file | |
run: zip -r ./$GITHUB_SHA.zip . | |
shell: bash | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Upload to S3 | |
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$PROJECT_NAME/$GITHUB_SHA.zip | |
- name: Code Deploy | |
run: aws deploy create-deployment --application-name $PROJECT_NAME --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name $PROJECT_NAME --s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=$PROJECT_NAME/$GITHUB_SHA.zip |