I think the most stable position is mounting it to the seatpost, facing backwards. That viewing angle gets old after a few minutes, but it produces pretty good quality video.
I have the gopro mounted on the head tube.
I made a mount by buying one of the simple k-edge mounts, a 2" pvc coupling...