You can create Web.config conversion files for publishing profiles, as well as for creating configurations. When publishing to Visual Studio or from the command line, Visual Studio applies both the appropriate assembly configuration conversion and the publication profile transformation. See this tutorial:
http://www.asp.net/web-forms/tutorials/deployment/visual-studio-web-deployment/web-config-transformations
This is one of a series of tutorials. Others in the series go through examples of creating publishing profile transformations and examples from the command line.
The tutorials use a web application project. If when you deploy a website, you mean deploying a website project, the process is basically the same until you installed the latest VS update (see the first tutorial in the series for links to VS updates).
source share