Skip to content

Update cicd.yml

Update cicd.yml #22

Workflow file for this run

name: Deploy
on:
push:
branches: [main,cicd]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build & Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
port: ${{ secrets.PORT }}
script: |
cd ~/back-end
pkill -f 'java -jar haru4cut-0.0.1-SNAPSHOT.jar' # 프로세스 죽이기
# git pull origin main
# /home/ubuntu/back-end/gradlew clean build -x test
# cd /home/ubuntu/back-end/build/libs
# nohup java -jar haru4cut-0.0.1-SNAPSHOT.jar &