The best way to remain on the right path is to invite others on the same path. In this way you will be known in your circle as a righteous person. As a result you have to be a symbol of goodness for others to influence them and bring to the right way. This will strengthen your will to remain righteous. So the best way to do good deeds is to invite others for them.
Be their good friend
The logic of spreading goodness is to first make others your friend. But you don’t have to be their friend just to follow the social norm of friendship. You have a purpose of seeking the blessings of Allah by inviting others on the path of Islamic teachings. You need to make them first believe that you are sincere to them. You have to prove this practically by supporting them in their time of need. In this way they would listen to your words with the same level of sincerity which you have for them. So becoming friends of others is must to convey the message of righteousness for the ultimate emancipation of your fellow beings.
Be a good listener
Good friend does not mean the one who simply talk to his friends. It is one who listen carefully what his friends are saying. Not only that but he fully comprehends what they mean to say. For this you need to take full interest in what they are saying to you. Wherever you need to interrupt, do it to make them speak more. After continuous talking they would give you your turn. Here you can now make them listen of your advice to follow the good and avoid the evil.
On your turn don’t jump to your point directly but first talk to them on their points of interest. Bring their interest to the maximum level. Make them not only happy listener but also quick receivers. Then come to your point and convince them with examples that the path of evil always lead to disaster. Your points must be strong enough fully supported with strong arguments to make them act on them without any doubt.
Follow up is must
Inviting people for good deeds is not a one-time activity. It is not a sort of duty. It must be your passion to bring others on the right path. For this purpose first you have to become eligible enough by your good deeds to create power in your words. So do follow up and keep reminding others what is the right path for the entire humanity.