Skip to content

Commit

Permalink
Update maven.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzybol authored Mar 17, 2024
1 parent 04c7937 commit 1a84e70
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,20 @@ jobs:
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy-to-server:
needs: build-and-release
runs-on: ubuntu-latest
steps:
- name: Deploy JAR to Server
env:
SERVER_IP: ${{ secrets.SERVER_IP }}
SERVER_USER: ${{ secrets.SERVER_USER }}
SERVER_PATH: ${{ secrets.SERVER_PATH }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
scp target/*.jar $SERVER_USER@$SERVER_IP:$SERVER_PATH
if: ${{ always() }}

0 comments on commit 1a84e70

Please sign in to comment.