If you were sanding and polishing existing boards, I would change the order. Otherwise, painting first is the go.
When sanding, I would sand first, then paint (use drop sheets), then polish the boards. You don't want dust all over the fresh paint and you don't want ladders on fresh polish...