WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/azure-webapps-java-jar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Ready the VM after PR merge



on:

pull_request:

types:

- closed



jobs:

deploy:

runs-on: ubuntu-22.04



steps:

- name: Check out code

uses: actions/checkout@v2



- name: Deploy to VM

env:

VM_IP: "52.141.91.23"

VM_USERNAME: "part347"

VM_PASSWORD: "w@!@#$5431fsaW"

run: |

sudo apt update

sudo apt install -y openssh-client

echo "$VM_PASSWORD" | sshpass -e ssh -o StrictHostKeyChecking=no "$VM_USERNAME@$VM_IP" "sudo apt update && sudo apt install -y git maven prometheus && sudo apt install -y docker.io"
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:17
EXPOSE 8080
ADD ./target/spring-petclinic-3.1.0-SNAPSHOT.jar spring-petclinic-3.1.0-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/spring-petclinic-3.1.0-SNAPSHOT.jar"]