https://blogs.msdn.microsoft.com/acoat/2016/01/28/publish-a-...
EDIT: also http://stackoverflow.com/questions/31653643/how-to-deploy-a-...