Recommended Kamal/GitHub Actions setup for Dev and Production deployments?

Hi,

I’m using the latest ServiceStack Vue SPA template with Kamal deployment, and I’m trying to adapt the generated CI/CD setup for a two-environment workflow:

  • merge to main/dev branch deploys to a Dev server

  • cutting a release/tag deploys to a Production server

The template’s current Kamal setup appears to be geared toward a single deployment target/server, so I’m trying to understand the recommended ServiceStack approach before customising too much.

Are there any up-to-date examples of a ServiceStack app using GitHub Actions + Kamal with separate Dev and Production destinations, secrets, hosts, images/services, and migrations?

In particular, I’m interested in the intended pattern for:

  • separate dev and prod Kamal destinations

  • separate GitHub Actions workflows or one workflow with environment switching

  • pushing/syncing Kamal env files before running kamal app exec migrations

  • handling runtime appsettings/secrets for each environment

  • running migrations before or during deploy

I can make this work with custom workflow changes, but I’d rather follow the pattern intended by the template if there is one.

Thanks.

The templates are designed to provide a simple solution for deploying Apps using Kamal to a vanilla Linux server. It doesn’t support multiple environments, for that I would be using a modified copy of the GitHub Action deployment script that uses a different configuration file as described in:

The separate GitHub Action should also be manually triggered instead of being run on each commit.

1 Like