Deuteronomy 17:3-5
17:3 by serving other gods and worshiping them – the sun, moon, or any other heavenly bodies which I have not permitted you to worship.
17:4 When it is reported to you and you hear about it, you must investigate carefully. If it is indeed true that such a disgraceful thing is being done in Israel,
17:5 you must bring to your city gates that man or woman who has done this wicked thing – that very man or woman – and you must stone that person to death.