As a developer i want to create a new environment when a new PR is opened so i can test that PR’s Code in isolation without having to merge the code to dev

I’d like to create new envs via trellis when a PR is created.

Acceptance Criterias

  • should use copy of staging db
  • should use copy of envs from staging
  • environment should use PR ID
  • should use a domain with PR ID
  • should be compatible with github actions.
  • should be created when a new PR is opened
  • should get changes from newer commits in PR
  • should be deleted when PR is closed
  • should be deleted when PR branch is deleted

It doesn’t cover all of your use cases, but take a look at this, particularly the examples, which includes a dry-run action.

e class='quote' data-post="1" data-topic="25410">
Introducing Trellis GitHub Deployment. rocket Trellis GitHub Deployment Automatically deploy your Trellis-based WordPress site to staging and production environments on merge to staging and main branches respectively, and keep plugins, themes, and WordPress core up to date with Dependabot. Features rocket Automatic (or manual) deployment to staging and production environments using GitHub Actions when pull requests are merged to your staging and main branches respectively. …

Trellis’s own integration test makes the brilliant move of provisioning the VM it’s running on (cheers, @swalkinshaw), which might help too: