The remarkable electrical and optical properties of single-walled carbon nanotubes have allowed for engineering device prototypes showing great potential for applications such as photodectors and solar cells. However, any path towards industrial maturity requires a detailed understanding of the fundamental mechanisms governing the process of photocurrent generation. Here we present scanning photocurrent microscopy measurements on a double-gated suspended semiconducting single-walled carbon nanotube and show that both photovoltaic and photothermal mechanisms are relevant for the interpretation of the photocurrent. We find that the dominant or non-dominant character of one or the other processes depends on the doping profile, and that the magnitude of each contribution is strongly influenced by the series resistance from the band alignment with the metal contacts. These results provide new insight into the interpretation of features in scanning photocurrent microscopy and lay the foundation for the understanding of optoelectronic devices made from single-walled carbon nanotubes.