Does anyone have an idea how to solve this or work around it? I'd like
to avoid deploying as sudo or forcing the team, including me, to use a
single user for deployment.
Use Webistrano, thereby you will always know who deployed which version
when and get a nice UI.
See
Using sudo doesn't necessarily mean that you're giving away full root
access. You can allow sudo access for a particular command only, and/or
allow sudoing as a particular user only. man sudoers for more info. (If
you allow sudo access for a script just make sure it's not writable.)
I would use