This commit is contained in:
2025-11-27 13:20:40 +01:00
parent 075fda64f6
commit 94061891e3

View File

@@ -27,23 +27,15 @@ jobs:
- name: Build with Maven
run: mvn -B clean package
- name: Copy jar to server (direct)
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
source: "target/*.jar"
target: "/opt/auction/"
tar_ignore: true
overwrite: true
- name: Rename jar + restart
- name: Deploy JAR via native SCP
uses: appleboy/ssh-action@v0.1.7
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
mv /opt/auction/*.jar /opt/auction/app.jar
echo "Copying JAR to server..."
scp -o StrictHostKeyChecking=no target/troostwijk-scraper-1.0-SNAPSHOT-jar-with-dependencies.jar ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:/opt/auction/app.jar
echo "Restarting service..."
sudo systemctl restart auction
echo "Deploy complete"