Case study

From CI SSH scripts to atomic releases

A two-engineer SaaS on a pair of VPS hosts replaced a fragile deploy step in CI with atomic releases, a shared vault and a rollback anyone can press.

Agentless host that only needs SSH, bash and a deploy user

Context

This composite story is based on small SaaS teams we talk to most often: two or three engineers, one product, a web and a worker VPS at Hetzner or DigitalOcean, and a deploy step that lives at the bottom of a CI workflow.

The CI job built the app, opened an SSH connection with a key stored as a repository secret, pulled the latest code on the server and restarted the service. It worked on good days.

On bad days a half-finished pull left the server between versions, and the only way back was another commit and another full pipeline run while users waited.

Before

The team did not want a platform migration. They wanted the same servers, the same Git repo and a deploy that could not leave production half-updated.

  • Deploys ran `git pull && restart` in place on the live directory
  • Rolling back meant reverting a commit and waiting for CI again
  • The production SSH key sat in repository secrets and two laptops
  • No one could see what was running on the servers without SSH

Why PlainShip

They kept GitHub Actions for tests. The deploy step became a single PlainShip release instead of a hand-written SSH script, and the key moved out of repository secrets.

  • No agent and no container runtime needed on the existing VPS hosts
  • Release folders plus a symlink switch remove the half-deployed state
  • One vault for the deploy key and environment files
  • CI keeps building and testing; PlainShip handles the release on the server

Setup on app.plainship.dev

  1. 01

    Added the web and worker hosts with a dedicated deploy user

  2. 02

    Imported the existing .env file into the vault

  3. 03

    Configured the app with a build command, shared folders and a healthcheck URL

  4. 04

    Turned on Slack alerts for failed jobs

The first release ran side by side with the old directory, so nothing changed for users until the symlink switched. The old deploy script was deleted a week later.

After

  • 1 clickRollback to the previous release
  • 0Deploy keys left in repository secrets
  • SameServers, repo and hosting provider

The biggest change was confidence: either engineer can ship on a Friday, because going back is one button and the previous release is still on disk.

What we learned

  • In-place `git pull` deploys are the most common source of half-broken releases.
  • Keep CI for tests; let the server-side release be atomic.
  • Move production keys out of repository secrets as early as possible.
“We kept our servers and our pipeline. We just stopped being scared of the deploy step.”
— Co-founder, two-person SaaS (composite)
From CI SSH scripts to atomic releases | PlainShip