fix : 채팅방 목록 조회 시, 응답 채팅 데이터 필드 추가 #395
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: CD | |
on: | |
pull_request: | |
branches: [ "main", "dev" ] | |
push: | |
branches: [ "main", "dev" ] | |
permissions: | |
contents: read | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# 1. Java 17 세팅 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: API모듈 YML 파일 생성 | |
run: | | |
mkdir -p ./api/src/main/resources | |
echo "${{ secrets.APPLICATION_API_YML }}" > ./api/src/main/resources/application-api.yml | |
- name: CORE모듈 YML 파일 생성 | |
run: | | |
mkdir -p ./core/src/main/resources | |
echo "${{ secrets.APPLICATION_CORE_YML }}" > ./core/src/main/resources/application-core.yml | |
- name: FCM 시크릿키 생성 | |
run: | | |
echo "${{ secrets.FIREBASE_JSON }}" | base64 --decode > ./core/src/main/resources/firebase.json | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 | |
with: | |
arguments: api:build -x test | |
- name: docker login | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: docker image build | |
run: docker build -f Dockerfile -t ${{ secrets.DOCKERHUB_USERNAME }}/boardsignal:server . | |
- name: docker Hub push | |
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/boardsignal:server | |
- name: Deploy with push | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY_PAIR }} | |
port: ${{ secrets.PORT }} | |
script: | | |
docker -v | |
sudo docker stop boardsignal-server || true | |
sudo docker stop boardsignal-redis || true | |
sudo docker container prune -f | |
sudo docker pull redis | |
sudo docker run -d -p 6379:6379 --name boardsignal-redis redis:latest | |
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/boardsignal:server | |
docker images | |
sudo docker run -d --log-driver=syslog \ | |
-e TZ=Asia/Seoul \ | |
-p 8080:8080 --name boardsignal-server \ | |
${{ secrets.DOCKERHUB_USERNAME }}/boardsignal:server |