title: Jenkins deploy per branch
body: <p>I have a PHP application that will be using Jenkins and GitHub to automatically deploy every time when pushed.</p>
  
  <p>I am working on a branch so if I push any changes I want to deploy to branch.test.com and see the changes right away.</p>
  
  <p>I am trying to use "Execute Shell" in Jenkins so after build, it finds out which branch ('master' or 'develop') is updated and copies it to the <code>www</code> folder to reflect the changes.</p>
  
  <p>Am I on the right track? </p>