We extend a result of Lopes and Thieullen [Sub-actions for Anosov flows. Ergod. Th. & Dynam. Sys. 25(2) (2005), 605–628] on sub-actions for smooth Anosov flows to the setting of geodesic flow on locally CAT(
$-1$) spaces. This allows us to use arguments originally due to Croke and Dairbekov to prove a volume rigidity theorem for some interesting locally CAT(
$-1$) spaces, including quotients of Fuchsian buildings and surface amalgams.