Refactor: CommonResponse 형태 수정 및 validation 에러메시지 반환 #65
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: hhive | |
on: | |
pull_request: | |
branches: [ dev ] | |
types: [closed] | |
jobs: | |
build-docker-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build with Gradle | |
run: ./gradlew build -Pprofile=test | |
- name: Build and push Docker image | |
run: | | |
sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | |
sudo docker build -f Dockerfile -t ${{ secrets.DOCKERHUB_USERNAME }}/hhive . | |
sudo docker push ${{ secrets.DOCKERHUB_USERNAME }}/hhive | |
- name: Deploy Front to prod | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.AWS_HOST }} | |
username: ubuntu | |
key: ${{ secrets.AWS_SSH_KEY }} | |
port: 22 | |
script: | | |
docker rm -f $(docker ps -qa) | |
docker rmi ${{ secrets.DOCKERHUB_USERNAME }}/hhive | |
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/hhive | |
docker compose up -d |