Skip to main content

One post tagged with "ci"

View All Tags

Preview Environments per Pull Request, for Less Than a Cent an Hour

· 7 min read

Short answer: a preview environment on Hostim is just one more app per pull request. A GitHub workflow deploys pr-42-site and pr-42-api when the PR opens, redeploys them on every push, comments the links on the PR, and deletes both when the PR is closed or merged. On the smallest plan an app costs about €0.0034 an hour, so a two-app preview that lives for two days is around 33 cents.

This came up while I was writing our static site hosting guide. One of the limits I listed was "no deploy previews", and then I sat there looking at it – we bill by the hour, an app takes 30 seconds to create, and deleting it is one command. The feature was already there, it just had no name.