all
This commit is contained in:
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@@ -27,22 +27,24 @@ jobs:
|
|||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: mvn -B clean package
|
run: mvn -B clean package
|
||||||
|
|
||||||
- name: Debug jar output
|
- name: Copy jar to server (no tar)
|
||||||
run: |
|
uses: appleboy/scp-action@v0.1.7
|
||||||
echo "Listing target directory:"
|
with:
|
||||||
ls -la target
|
host: ${{ secrets.SERVER_IP }}
|
||||||
|
username: ${{ secrets.SERVER_USER }}
|
||||||
|
key: ${{ secrets.SERVER_SSH_KEY }}
|
||||||
|
source: "target/troostwijk-scraper-1.0-SNAPSHOT-jar-with-dependencies.jar"
|
||||||
|
target: "/opt/auction/app.jar"
|
||||||
|
overwrite: true
|
||||||
|
tar: false
|
||||||
|
timeout: 600
|
||||||
|
|
||||||
- name: Deploy JAR via native SCP
|
- name: Restart service
|
||||||
uses: appleboy/ssh-action@v0.1.7
|
uses: appleboy/ssh-action@v0.1.7
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SERVER_IP }}
|
host: ${{ secrets.SERVER_IP }}
|
||||||
username: ${{ secrets.SERVER_USER }}
|
username: ${{ secrets.SERVER_USER }}
|
||||||
key: ${{ secrets.SERVER_SSH_KEY }}
|
key: ${{ secrets.SERVER_SSH_KEY }}
|
||||||
script: |
|
script: |
|
||||||
echo "Copying JAR to server..."
|
|
||||||
scp -o StrictHostKeyChecking=no target/*.jar ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:/opt/auction/app_new.jar
|
|
||||||
echo "Replacing live JAR..."
|
|
||||||
mv /opt/auction/app_new.jar /opt/auction/app.jar
|
|
||||||
echo "Restarting service..."
|
|
||||||
systemctl restart auction
|
systemctl restart auction
|
||||||
echo "Deploy complete"
|
echo "Deploy complete"
|
||||||
|
|||||||
Reference in New Issue
Block a user