Conditions of righteous deeds

When does Allaah accept a person’s deeds? What are the conditions for a deed to be righteous and acceptable
...