diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 001e7b5e..3e9fa458 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -20,16 +20,40 @@ jobs:
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 with Maven
- run: mvn -B package --file pom.xml
-
- # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- - name: Update dependency graph
- uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
+ - uses: actions/checkout@v3
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+ cache: maven
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml
+
+ - name: Run SonarQube
+ run: mvn sonar:sonar -Dsonar.projectKey=ci-cd-test -Dsonar.host.url=${{ secrets.SONAR_HOST }} -Dsonar.login=${{ secrets.SONAR_TOKEN }}
+
+ # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
+ - name: Update dependency graph
+ uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
+
+ - name : upload file
+ uses: appleboy/scp-action@master
+ with:
+ host: ${{ secrets.SSH_IP }}
+ username: ${{ secrets.SSH_ID }}
+ key: ${{ secrets.SSH_KEY }}
+ port: ${{ secrets.SSH_PORT }}
+ source: "target/*.jar"
+ target: "~/"
+ rm: false
+
+ - name: execute shell script
+ uses: appleboy/ssh-action@master
+ with:
+ host: ${{ secrets.SSH_IP }}
+ username: ${{ secrets.SSH_ID }}
+ key: ${{ secrets.SSH_KEY }}
+ port: ${{ secrets.SSH_PORT }}
+ script_stop: true
+ script: "./startup.sh"
diff --git a/pom.xml b/pom.xml
index c9d8da26..0c37a8db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,10 +17,10 @@
11
-
+
org.springframework.boot
spring-boot-starter-data-redis