I already have a deploy.rb that can deploy my app on my production server.
My app contains a custom rake task (a .rake file in the lib/tasks directory).
I\
Just install the gem without messing with custom capistrano recipes and execute desired rake tasks on remote servers like this:
cap production invoke:rake TASK=my:rake_task
Full Disclosure: I wrote it