Drush configuration
Drush requires a config file (.drush/drush.yml
) that declares (amongst others) what the default site URL is. That URL value varies based on the branch you’re on, so it needs to be generated and can't be in a static file.
To allow Drush to run successfully (and use it to run cron tasks), the Platform.sh Drupal template includes a short script to generate that config file on each deploy.
If you don't want to use the template but still want to use drush, you can download the script from the template, place it in adrush
directory in your project, so it can be called from the deploy hook.