all
This commit is contained in:
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user