Trellis Deployment with GitHub Actions

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.
  • :arrows_counterclockwise: On-Demand one-way sync database and assets from production to staging.
  • :link: Maintains a history of GitHub Deployments and provides links to the current deployments in each environment.
  • :key: Re-set deployment keys on-demand when you need to change who has access to staging or production.
  • :package: WordPress plugin, core, and theme updates managed with Dependabot.
  • :memo: Optionally generates README.md with deployment status badges and setup instructions.

Optional Additional Workflows

Click to expand
  • :seedling: Sage 10 build test on pull request or on-demand (make sure your theme builds before you deploy it!).
  • :test_tube: Dry-run deployments to staging and production environments on pull request or on-demand (confirm Trellis can deploy successfully without finalizing the deployment).
  • :eject_button: Eject WordPress site from Bedrock and Trellis and prepare database and assets for migration to traditional WordPress hosting.
14 Likes

Thanks for looking at this y’all! This is an open-source project, and reflects my typical setup, which is as close as possible to the Trellis documentation. I welcome suggestions, pull requests, and discussion for how to make it more flexible and functional!

Thanks for sharing this @MWDelaney. I know how much work into it!

One suggestion I have is to add a note about the usage of setup-trellis-cli in the README. eg: How it’s additive (and built on it), and why someone would use yours over the basic setup-trellis-cli.

1 Like

This is awesome, thanks for sharing!