Well, in basic D&D, characters did it by reaching 30th level or higher, then doing a whole bunch of tests. Specifically a Quest (for an artifact), a Trial (which was doing something truly great), Testimony (which was having dedicated followers of some sort) , and a Task (which was sorta like a trial. Usually one involved combat with something really tough, the other making or doing something great.
At any rate, I think great (as in immense in scope) deeds are needed. While it's very noble, it's actually not that uncommon for people to sacrifice themselves to save the lives of others.
Anyway, I think Ascelpius was made into a god. (He might have had a god as a parent, though). As were several famous Romans. Romulus, I think. Julius and Augustus Caesar.
While it was usually Pharoahs, I believe Imhotep was considered to be a god later on, mostly based on the stuff he did and invented.
I would not be surprised for later people to consider Elvis a god.
It's not a perfect similarity, but the process of sainthood is probably similar. Most of them became saints for what they did in their life.