Skip to content

Merge pull request #59 from depromeet/feature/#43-2 #24

Merge pull request #59 from depromeet/feature/#43-2

Merge pull request #59 from depromeet/feature/#43-2 #24

Workflow file for this run

name: deploy-bbogak-dev-server
on:
push:
branches: main
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Build and Test
run: |
chmod +x gradlew
./gradlew build -x openapi3
deploy:
runs-on: ubuntu-latest
needs: ci
steps:
- name: Deploy spring MainServer(main)
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_KEY }}
script: |
cd ~/bbo-gak-server
git add .
git commit -m "temp commit"
git fetch origin main
git merge origin/main
./gradlew clean build
./gradlew openapi3
docker rm bbo-gak-server_back_1 --force
docker rmi bbo-gak-server_back
docker-compose -f docker-compose-dev.yml up --build -d