When out of stamina (completely or partially), you can take a zip-line, and spam CTRL + Spacebar to quickly drop and get back on the zip-line. If you do this quick enough you'll gain one stamina bar back. (you kinda have to look at the line of the zip-line while doing this to get it right)