Gitlab deployment via ssh which user rights

i will update my application with gitlab. For this i need user with private key that stored in gitlab ci vars. My question is whish user, with wish rights can use to do deployments with gitlab-ci to server. Can i use the www-data user that only have rights for www dir or other user with root priviliges?

At the time i use www-data user for deployment. I am afraid thats insecure.

Best regards gyros

Mayby this help for explaination for my problem. This is a coderow from my .gitlab-ci.yml. And my question is which user should be taken to perform these operations read/write/access operations in this /var/www/application folder. www-data?

rsync -e 'ssh -p 22' --delete --delete-excluded $RSYNC_EXCLUDE --recursive --compress --copy-links --no-perms --omit-dir-times $VERSION/ $DEPLOY_USER@$DEPLOY_HOST:$NEWDIR/;