Moved the deploy action to the earliest possible point