public function deploy()
    {
        $isFtp = $this->connections->getCurrentConnectionKey()->isFtp();

        $from = $this->on('dummy', function () {
            $this->setupIfNecessary();
            $this->executeTask('CreateRelease');
            $this->executeTask('PrepareRelease');

            return $this->releasesManager->getCurrentReleasePath();
        });

        $to = $isFtp
            ? $this->paths->getFolder()
            : $this->releasesManager->getCurrentReleasePath();

        return $this->onReleaseReady($from, $to);
    }