Personally I think that the only option for a Republican victory is for the coup in 1936 to fail, once we get into the civil war proper the (admittedly at times marginally ) greater ability of the Nationalists to mobilise militarily and the greater help that they were able to bring in internationally and finally the greater internal unity that Franco was able to impose meant that with a lengthy civil war they are by far the most likely victors.
If the coup of 1936 failed and somehow (and given the state of Spain in 1936 this is a very big ask) the Republic got back on track then the communist influence would be minor, it was only the aid that Russia gave Spain that gave the Communist party such huge leverage within the republic.
There is somewhere a very good timeline on this site where the coup fails, (basically because Franco doesn't support it) and then plays the consequences of that out throughout the second world war. I have tried to look for it but couldn't find it so sorry no link available. My memory of it was that the consequence led to a German invasion of Spain. As others have stated not sure if that would have happened.
The absence of the Spanish Civil war might have had other consequences, including perhaps a lessening of the climate of ideological conflict, which ironically may have made the left more pacifist, post 1936 the left was more belligerent in the UK and would have been unlikely to take a George Lansbury type attitude towards Hitler. Also the Spanish civil war helped to bind Mussolini to the Axis, particularly with the very heavy participation of Italian 'volunteers' in Spain. I would be interested to see a timeline which focused on the political/diplomatic effect of there not being a Spanish Civil war rather than purely the military ones, but also one that took into account the consequent trajectory of spanish history. Sorry I haven't got the time/resources to do this myself.