The habitability of a planet depends on various factors, such as delivery of water during the formation, the co-evolution of the interior and the atmosphere, as well as the stellar irradiation which changes in time. Since an unknown number of rocky exoplanets may operate in a one-plate convective regime, i.e., without plate tectonics, we aim at understanding under which conditions planets in such a stagnant-lid regime may support habitable surface conditions. Understanding the interaction of the planetary interior and outgassing of volatiles with the atmosphere in combination with the evolution of the host star is crucial to determine the potential habitability. M-dwarf stars in particular possess a high-luminosity pre-main sequence phase which endangers the habitability of planets around them via water loss. We therefore explore the potential of secondary outgassing from the planetary interior to rebuild a water reservoir allowing for habitability at a later stage. We compute the boundaries of the habitable zone around M, K, G, and F-dwarf stars using a 1D cloud-free radiative-convective climate model accounting for the outgassing history of CO2 and H2O from an interior evolution and outgassing model for different interior compositions and stellar luminosity evolutions. The outer edge of the habitable zone strongly depends on the amount of CO2 outgassed from the interior, while the inner edge is mainly determined via the stellar irradiation, as soon as a sufficiently large water reservoir has been outgassed. A build-up of a secondary water reservoir for planets around M-dwarf stars is possible even after severe water loss during the high luminosity pre-main sequence phase as long as some water has been retained within the mantle. Earth-like stagnant-lid planets allow for habitable surface conditions within a continuous habitable zone that is dependent on interior composition.