Skip to content

test: cicd workflow 테스트 #2

test: cicd workflow 테스트

test: cicd workflow 테스트 #2

Workflow file for this run

name: CI / CD
on:
push:
branches: [ "master" ]
jobs:
ci-cd:
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'
cache: maven
- name: build
run: mvn package
- name : delivery
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
source: "target/*.jar"
target: "~/"
rm: false
- name: deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script_stop: true
script: "kill $(lsof -i:8080 -t) & nohup java -jar ~/target/*.jar > ~/nohup.log 2>&1 &"