Bhagavad Gita 3.20

कर्मनैव हि संसिद्धिमास्थिता जनकादय: |
लोकसंग्रहमेवापि संपश्यन्कर्तुमर्हसि

Translation

By performing their prescribed duties, King Janak and others attained perfection. You should also perform your duties to set an example for the good of the world.