Skip to content

fix/#16 import 수정 및 CICD 수정 #16

fix/#16 import 수정 및 CICD 수정

fix/#16 import 수정 및 CICD 수정 #16

Workflow file for this run

name: CI / CD
on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]
jobs:
ci-cd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare secure key manager certKey file
run:
echo ${{ secrets.SECURE_KEY_MANAGER_CERT_KEY }} > t3team-skm-cert.txt
mkdir src/main/resources/key
base64 -d t3team-skm-cert.txt > src/main/resources/key/t3team-skm-cert.p12
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: build
run: ${{ secrets.MAVEN_OPTION_PACKAGES }}
- name : sonar qube
run: mvn sonar:sonar -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.login=${{ secrets.SONAR_LOGIN_TOKEN }}
- 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:9090 -t) & nohup java -jar ~/target/*.jar > ~/nohup.log 2>&1 &"