cg_autoaction is a bitmask to enable logging of match specific data:

value function
1 Demo
2 Screenshot
4 Statistic file (html)

Set this value to 7 will save all three in your mod folder into the subfolders demos/<date>, screenshots/<date> and stats/<date>. The file name contains the match time, game type, your player name and the map name.