If the rafters are all same length it looks like the long wall tops have spread realign then pilot drill the ridge board and screw into the center line of the correctly positioned say right hand rafter then in the next bay into the left hand and so on then screw at a angle there opposite numbers this will give a straight ridge and strong connection . Fix a collar at the height you want at the first and last A frame then set up strings to fit the rest to keep it all straight and level.