refactor deploy setup, detect when setting up on different branch