Something like
msbuild /t:publish [use PublishProfileName] someproject.csproj
This is an alternative solution for achieving Pavel's solution but using MsBuild target in a MsBuild file:
Release $(DeploymentProject)\bin\$(Configuration) C:\Inetpub\wwwroot