diff --git a/gitlab/deploy.sh b/gitlab/deploy.sh
index 142952541069a6f3f7b6a3e979c5537f054e04e2..9ad085cfd97b999ab6e4692d50a82b2db69cce1d 100755
--- a/gitlab/deploy.sh
+++ b/gitlab/deploy.sh
@@ -8,15 +8,15 @@ lock_pypirc
 setup_deploy register --repository staging
 setup_deploy check sdist --formats zip upload --repository staging
 
+# if that worked, uploads source package to the production index
+log_info "Uploading package to ${PYPISERVER} on behalf of ${PYPIUSER}..."
+setup_deploy register --repository production
+setup_deploy check sdist --formats zip upload --repository production
+
 # if that worked, uploads documentation to pythonhosted if any exists
 if [ -d sphinx ]; then
   log_info "Uploading documentation to ${PYPISERVER} on behalf of ${PYPIUSER}..."
   setup_deploy upload_docs --upload-dir sphinx --repository production
 fi
 
-# if that worked, uploads source package to the production index
-log_info "Uploading package to ${PYPISERVER} on behalf of ${PYPIUSER}..."
-setup_deploy register --repository production
-setup_deploy check sdist --formats zip upload --repository production
-
 unlock_pypirc