Sitemap
Javarevisited

A humble place to learn Java and Programming better.

Member-only story

Deploying a Java Spring Service to a Virtual Machine Using Github Actions

--

Photo by on

While it is true that there are some clear benefits to deploying your applications using containers over virtual machines, in some cases due to costs or other requirements you might prefer to deploy to a virtual machine.

In this post, we’ll go through the steps required for you to be able to deploy a Java Spring service to a virtual machine using .

Let’s begin with a few assumptions we’ll be making before we begin:

  1. The virtual machine that we’ll be using has already been created
  2. The virtual machine already has some version of the OpenJDK installed
  3. You are able to SSH into this virtual machine

When to Deploy the Service?

Let’s start with the most critical question. When should we deploy our application?

Well, you have a few options... Do you want to deploy your application when you check-in code to a specific branch? or, do you want to have more control and deploy it manually?

With GitHub Actions, all of these are possible. You can either be more creative and do things like, deploy the application when a ticket is created or when a release is created.

Javarevisited
Javarevisited

Published in Javarevisited

A humble place to learn Java and Programming better.

tech.mia
tech.mia

Written by tech.mia

Passionate about coding. Engineering software one keystroke at a time… ⌨️

No responses yet