There probably are civilian yards, but it's likely that they're only producing small passenger ships, bitty little tramp freighters, and in-system craft.
We know that warp-capable ships can be relatively small (say, no bigger than ocean-going ships in real life), in which case it's entirely possible that most civilian ships in the galaxy mass, say, less than 400 kilotons. That still provides a lot of space for cargo, especially since shipments of crude bulk materials aren't likely to be profitable. And yet shipyards that small might well be totally beneath our radar for military purposes.