You don't even have to swear at all, the Constitution allows officials to swear or affirm. This is because some religious groups at the time of the drafting of the constitution were morally opposed to swearing oaths: https://en.m.wikipedia.org/wiki/Affirmation_(law)