protected function runDeployHooks(array $appConfig, $appDir)
    {
        if (empty($this->settings['run-deploy-hooks'])) {
            return null;
        }
        if (empty($appConfig['hooks']['deploy']) && empty($appConfig['hooks']['post_deploy'])) {
            $this->output->writeln('No deploy or post_deploy hooks found');
            return null;
        }
        $result = null;
        if (!empty($appConfig['hooks']['deploy'])) {
            $this->output->writeln('Running deploy hooks');
            $result = $this->runHook($appConfig['hooks']['deploy'], $appDir);
        }
        if (!empty($appConfig['hooks']['post_deploy']) && $result !== false) {
            $this->output->writeln('Running post_deploy hooks');
            $result = $this->runHook($appConfig['hooks']['post_deploy'], $appDir);
        }

        return $result;
    }