diff --git a/src/commands/find_wpe_install.yml b/src/commands/find_wpe_install.yml index 6fb54ff..9a8ce0d 100644 --- a/src/commands/find_wpe_install.yml +++ b/src/commands/find_wpe_install.yml @@ -21,6 +21,7 @@ steps: WPE_ENV="<< parameters.environment >>" fi + # Set the destination according to the environment. case "$WPE_ENV" in master) WPE_INSTALL="$WPE_PRODUCTION_INSTALL";; @@ -32,5 +33,10 @@ steps: WPE_INSTALL="$WPE_DEVELOPMENT_INSTALL";; esac + # Match any deploy-install pattern and set the install as the destination. + if [[ "$CIRCLE_BRANCH" =~ deploy-[a-z][a-z0-9]{2,13} ]]; then + WPE_INSTALL="${CIRCLE_BRANCH/deploy-/}" + fi + echo "export WPE_INSTALL=$WPE_INSTALL" >> "$BASH_ENV" source "$BASH_ENV" diff --git a/src/examples/wordpress-site.yml b/src/examples/wordpress-site.yml index 181b15c..6beb7fb 100644 --- a/src/examples/wordpress-site.yml +++ b/src/examples/wordpress-site.yml @@ -72,6 +72,16 @@ usage: only: - /feat-.*/ + - wpengine/deploy_site: + name: deploy-site + requires: + - wpengine/lint + - wpengine/codeception + filters: + branches: + only: + - /deploy-.*/ + regression: jobs: - wpengine/backstop_reference: