Skip to content

Commit

Permalink
Update inventory-ci-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeineb2001 authored Dec 22, 2024
1 parent 00cc008 commit 3cee2ad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/inventory-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,17 @@ jobs:
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.DEPLOYMENT_MACHINE_IP }} >> ~/.ssh/known_hosts
- name: Create destination directory on VPS
run: |
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" ssh ${{ secrets.DEPLOYMENT_MACHINE_USER }}@${{ secrets.DEPLOYMENT_MACHINE_IP }} \
"mkdir -p ~/inventory-service"
- name: Transfer JAR to VPS
run: |
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" scp ./inventory-service-1.0.0-SNAPSHOT.jar \
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" scp inventory-service-1.0.0-SNAPSHOT.jar \
${{ secrets.DEPLOYMENT_MACHINE_USER }}@${{ secrets.DEPLOYMENT_MACHINE_IP }}:~/inventory-service/service-inventory.jar
- name: Verify if the JAR file exists on the VPS
run: |
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" ssh ${{ secrets.DEPLOYMENT_MACHINE_USER }}@${{ secrets.DEPLOYMENT_MACHINE_IP }} \
Expand Down

0 comments on commit 3cee2ad

Please sign in to comment.