diff --git a/robo-components/DeploymentTrait.php b/robo-components/DeploymentTrait.php index 00e7435d1..130ea28fa 100644 --- a/robo-components/DeploymentTrait.php +++ b/robo-components/DeploymentTrait.php @@ -507,6 +507,9 @@ public function deployPantheonSync(string $env = 'test', bool $do_deploy = TRUE) ->exec("terminus remote:drush $pantheon_terminus_environment -- cim --no-interaction") ->exec("terminus remote:drush $pantheon_terminus_environment -- cim --no-interaction") ->exec("terminus remote:drush $pantheon_terminus_environment -- cr") + // Pre-warm the Twig template cache so the first anonymous request + // after deploy gets a cached hit. + ->exec("terminus remote:drush $pantheon_terminus_environment -- twig:compile") ->exec("terminus remote:drush $pantheon_terminus_environment -- deploy:hook --no-interaction") ->run() ->getExitCode();