Fix NoMethodError when no public commit is found
When no canonical commit was found, create_deployment() would return nil instead of an Array of the deployments so far. This then triggered a NoMethodError when trying to concatenate all deployments.
This fixes https://gitlab.com/gitlab-org/release-tools/-/issues/474