Skip to content

Update cicd.yml

Update cicd.yml #12

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build & Deploy
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
HOSTNAME: ${{ secrets.HOST }}
USER_NAME: ${{ secrets.SSH_USERNAME }}
run: |
cd ~/back-end
pkill "java -jar haru4cut-0.0.1-SNAPSHOT.jar"
git pull
/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 &