Best way to trigger deploy previews from Github PR comment?

We like having deploy previews on PRs, but we’re wondering if there’s an easy way to opt into them on a PR-by-PR basis via Github comments instead of having them built automatically for each one.

1 Like

Not in the way I think you’d want. You can opt out of them in two ways:

  1. don’t have us build the branch they are against. This is all-or-nothing and would be annoying to change frequently, but in case you never want to build PRs targeting staging, that’s how you can configure it.

  2. use [skip ci] somewhere in the commit message to have us not build.

  3. we also have the idea of running a script to say whether to build or not:

This does require that you have a base directory set (so your code is in a subdirectory of the root), but is the most flexible option.