From 858fa79ac7736f6ed96a83824adb3b393881d44b Mon Sep 17 00:00:00 2001
From: allison <67673392+Allybe@users.noreply.github.com>
Date: Thu, 27 Aug 2026 15:44:05 -0500
Subject: [PATCH] more worky to server
---
.gitea/workflows/deploy.yaml | 34 ++++++++++++++++++++++++++++++++++
pom.xml | 2 +-
2 files changed, 35 insertions(+), 1 deletion(-)
create mode 100644 .gitea/workflows/deploy.yaml
diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml
new file mode 100644
index 0000000..60b7d13
--- /dev/null
+++ b/.gitea/workflows/deploy.yaml
@@ -0,0 +1,34 @@
+name: Build and Deploy Java Project
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ build-and-deploy:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v4
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v4
+ with:
+ java-version: '21'
+ distribution: 'temurin'
+ cache: 'maven'
+
+ - name: Build and Package with Maven
+ run: mvn clean package -DskipTests
+
+ - name: Deploy JAR to Server
+ uses: appleboy/scp-action@master
+ with:
+ host: ${{ secrets.SERVER_IP }}
+ username: ${{ secrets.SERVER_USERNAME }}
+ password: ${{ secrets.SERVER_PASSWORD }}
+ source: "target/*-jar-with-dependencies.jar"
+ target: "/opt/notifier/notifier.jar"
+ strip_components: 1
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 7233dbf..422dc16 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,7 +78,7 @@
- dep
+ jar-with-dependencies