name is on deed but not mortgage
As your name is only on the deed and not on the mortgage, you are not liable to pay off the loan. Thus, in case of a foreclosure, your credit will not be affected in any way. However, your name may appear on the foreclosure papers.