Miley pitches Arizona past Marlins, 8-4