I created a website (a Ruby on Rails application) that I would like to make open-source so that the community can make improvements. The source code is already publicly available on GitHub. However, I'd like to set up my server so that when I accept a pull request, the code is automatically deployed to production.
I doubt that I'm the first person to think of such a thing, so maybe a tool already exists to handle this. Currently I use Capistrano to deploy my application. Maybe there is a plugin available to add this sort of behavior. I also want to avoid publicizing the production API keys which currently only exist on the server.
If a tool/plugin does not already exist, what do I need to do in order to implement this type of behavior.