The deploy command standardizes how Drupal deployments work. The intent is your deployment script updates the codebase for the target site and then this command performs the following:

drush updatedb --no-cache-clear
drush cache:rebuild
drush config:import
drush cache:rebuild
drush deploy:hook

Authoring update functions

Below are the 3 types of update functions run by this command. Choose the most appropriate for your need.

Function Purpose
HOOK_update_n() Low level changes. Drupal API not allowed.
HOOK_post_update_NAME() Drupal API allowed.
HOOK_deploy_NAME() Runs after config is imported. Drupal API allowed.


If you need to customize this command, you should use Drush configuration for the subcommands listed above (e.g. updatedb, config:import, etc.).