How do I use GitLab's CI to automatically deploy my code to a VPS?

I’m pretty new to CI and I’m wondering how I would be able to do this with GitLab’s builtin CI, or there could be another, more effective way to do it. I’m open to all ideas!