Hi There,
I hope you are good,
based on my experience,
Option 1:
I did exactly the same thing for myself, I was working on spring project and I needed a way to automate the whole process, I use CircleCi for building and deploying my project which gives you a free account with unlimited build & deploys on a Docker container and you can deploy on your prefered server(EC2 instance for example).
Option 2:
if you love AWS as I do, you can use their own services instead of Jenkins and GitHub, you can use CodeCommit as Github, CodeBuild as Jenkins, CodeDeploy to deploy to your instances and Guess what your first project is for free.
If you want to use Jenkins you need to launch an EC2 instance so you will pay for the resources you use.
looking forward to work with you