What steps should a foreigner take to get a mortgage?

I am a foreigner and I want to take out a home mortgage in the USA. I think it's a good way to invest in your future. Home ownership can give me financial stability and a sense of community. I know that as a foreigner it will be difficult for me to get a mortgage, but I hope I can find a mortgage company that specializes in mortgages for foreigners. What steps should a foreigner take to get a mortgage?
What documents will I need?