Skip to content

Commit

Permalink
Merge pull request #5 from Baighasan/default_endpoint
Browse files Browse the repository at this point in the history
Default endpoint
  • Loading branch information
Baighasan authored Dec 29, 2024
2 parents 018c5bd + 2d81609 commit 89a067a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Deploys to an Azure Virtual Machine and starts the web app

name: Deploy Java app to Azure Virtual Machine

on:
pull_request:
branches: [ "main" ]
types: [ closed ]


jobs:
deploy:
if: github.event.pull_request.merged == true
Expand All @@ -26,8 +29,11 @@ jobs:

- name: Deploy to Azure Virtual Machine
env:
SPRING_BOOT_VM_IP: ${{secrets.SPRING_BOOT_VM_IP}}
SPRING_BOOT_VM_USERNAME: ${{secrets.SPRING_BOOT_VM_USERNAME}}
SPRING_BOOT_VM_PRIVATE_KEY: ${{secrets.SPRING_BOOT_VM_PRIVATE_KEY}}
SPRING_BOOT_VM_IP: ${{ secrets.SPRING_BOOT_VM_IP }}
SPRING_BOOT_VM_USERNAME: ${{ secrets.SPRING_BOOT_VM_USERNAME }}
SPRING_BOOT_VM_PRIVATE_KEY: ${{ secrets.SPRING_BOOT_VM_PRIVATE_KEY }}
run: |
scp -i <(echo "${SPRING_BOOT_VM_PRIVATE_KEY}") target/*.jar $SPRING_BOOT_VM_USERNAME@$SPRING_BOOT_VM_IP:/home/Baighasan/spring-boot-demo/
echo "Virtual Machine IP: $SPRING_BOOT_VM_IP"
echo "Virtual Machine Username: $SPRING_BOOT_VM_USERNAME"
echo "Virtual Machine Private Key: $SPRING_BOOT_VM_PRIVATE_KEY"
# scp -i <(echo "${SPRING_BOOT_VM_PRIVATE_KEY}") target/*.jar $SPRING_BOOT_VM_USERNAME@$SPRING_BOOT_VM_IP:/home/Baighasan/spring-boot-demo/

0 comments on commit 89a067a

Please sign in to comment.