How I Built a CI/CD Pipeline That Deploys to VPS Automatically πŸš€

in #devops β€’ 3 days ago

As a DevOps Engineer, one of the most satisfying moments is pushing code and watching it automatically deploy to production without touching the server manually.

Here's how I set up a CI/CD pipeline using GitHub Actions that deploys directly to a Hostinger VPS β€” something I use in real production projects today.

πŸ”§ The Stack

  • GitHub Actions β€” for the pipeline

  • Docker β€” to containerize the app

  • Nginx β€” as reverse proxy

  • Hostinger VPS β€” the deployment server

  • SSH β€” secure deployment trigger

βš™οΈ How It Works

  1. Developer pushes code to main branch

  2. GitHub Actions triggers automatically

  3. Pipeline builds the Docker image

  4. SSH into VPS and pulls the latest image

  5. Container restarts with zero downtime

  6. Nginx serves the updated app instantly βœ…

πŸ’‘ What I Learned

Before this, every deployment meant manually SSHing into the server, pulling code, restarting services β€” every single time.

Now it's fully automated. One push = live deployment. This saves hours every week and reduces human error drastically.

Automation isn't just about saving time β€” it's about building confidence in your deployments. πŸ™Œ

#DevOps #CICD #GitHubActions #Docker #Linux #VPS #Automation #TechLife #Hive

Sort: Β 

πŸ™Œ You're back! Great to see your second post on Hive, @cloudwithazar!

Sticking around is what makes the difference here β€” most newcomers post once and disappear. You didn't. That already puts you ahead.

A few things that help early on:

  • Engage with others – comments on other posts often bring more attention than waiting for votes
  • Use relevant tags – they help the right communities find you
  • Be consistent – even one post a week builds an audience over time

Keep going! The Hive community rewards persistence. πŸš€