Skip to content

#110 - bug: 도전방 랭킹 조회 시 랭킹 코드 값 검증 처리 오류 수정 #110

#110 - bug: 도전방 랭킹 조회 시 랭킹 코드 값 검증 처리 오류 수정

#110 - bug: 도전방 랭킹 조회 시 랭킹 코드 값 검증 처리 오류 수정 #110

name: Java CI with Gradle
on:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: make application-dev.yml
run: |
cd ./src/main/resources
touch ./application-dev.yml
echo "${{ secrets.APPLICATION_DEV }}" > ./application-dev.yml
touch ./application.yml
echo "${{ secrets.APPLICATION_YML }}" > ./application.yml
cd ../../test/resources
touch ./application.yml
echo "${{ secrets.APPLICATION_YML }}" > ./application.yml
- name: create-json
id: create-json
uses: jsdaniell/[email protected]
with:
name: "dodal-fcm.json"
json: ${{ secrets.FCM_JSON }}
dir: src/main/resources
- name: Build with Gradle
run: |
./gradlew cleanQuerydslSourceDir
./gradlew build
- name: docker build and push
run: |
docker login -u ${{ secrets.DOCKER_USERNAME}} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t ${{ secrets.DOCKER_REPO }}/dodal .
docker push ${{ secrets.DOCKER_REPO }}/dodal
- name: ec2 remote ssh and command by appleboy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ubuntu
key: ${{ secrets.EC2_KEY }}
script: |
sudo docker pull ${{ secrets.DOCKER_REPO }}/dodal
sudo docker stop $(sudo docker ps -qa)
sudo docker image prune -a -f
sudo docker-compose -f /docker/docker-compose-${{ secrets.SERVER_PROFILE}}.yml down --rmi all
sudo docker-compose -f /docker/docker-compose-${{ secrets.SERVER_PROFILE}}.yml up -d