Make sure version is created before deploymenet
Merge pull request #1715 from geoadmin/gjn_fix_deployversion

Make sure version is created before deployment