The complete build lifecycle, including three optional deployment steps and after checking out the git repository and changing to the repository directory, is: Install apt addons before_install install before_script script after_success or after_failure OPTIONAL before_deploy OPTIONAL deploy OPTIONAL after_deploy after_script