Improve the deployment script so that the history of the deployment repository doesn't grow infinitely