Miller homers, pitches Cards over Arizona 12-8