[refactor] 인증방이 해체되어도 인증기록은 남게 변경 및 nowUser 수정 #86
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: CI | |
on: | |
push: | |
branches: | |
- backend | |
env: | |
AWS_REGION: ap-northeast-2 | |
AWS_S3_ACCESS_KEY: ${{secrets.AWS_S3_ACCESS_KEY}} | |
AWS_S3_SECRET_KEY: ${{secrets.AWS_S3_SECRET_KEY}} | |
AWS_S3_BUCKET: ${{secrets.AWS_S3_BUCKET}} | |
JWT_SECRET: ${{secrets.JWT_SECRET}} | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
working-directory: ./backend | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v2 | |
- name: JDK 17 setup | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
- name: gradlew chmod | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean build --exclude-task test | |
- name: AWS credential setting | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: ${{ env.AWS_REGION }} | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: upload to s3 | |
run: aws deploy push --application-name dodo-codedeploy --ignore-hidden-files --s3-location s3://my-dodo-bucket/build.zip --source . | |
- name: EC2 deploy | |
run: aws deploy create-deployment | |
--application-name dodo-codedeploy | |
--deployment-config-name CodeDeployDefault.AllAtOnce | |
--deployment-group-name dodo-group | |
--s3-location bucket=my-dodo-bucket,bundleType=zip,key=build.zip |