Since I’d firmly oppose such a war, I’m going to assume I was elected in a backlash against it.
So I’ll just exit immediately, and instead make an agreement with another, non-invading, democratic country to help with rebuilding (using my country’s money). I’ll sign international treaties admitting the criminal nature of the invasion, pledge reparation, and agree never to do it again. Then start speed-signing disarmament treaties.
I assume I myself would get ousted at some point in this process though.