My apartment has a gym and when ever I press the button to speed up on the treadmill I get static shocks.
Take a bit of bare copper wire and wrap it around your wrist. Then connect the other bare end (insulation stripped off) end to the metal handle bar on the machine before you start running. This will allow the charge to run ut as you generate it. Make sure wire is long enough to give your arm freedon to swing (if you do) but short enough not to have it hanging at feet to trip on