The slow-roll inflation scenario is studied in the frame of the scalar–tensor theory of gravity, where the scalar field has a nonminimal coupling to the geometric part. After deriving the main dynamical and observable parameter, the consistency of the model with data is considered and we could determine the constants of the model. Then, using the result, the swampland criteria are studied and it is revealed that they are perfectly satisfied. Finally, reheating phase is considered and it is found that the reheating phase lasts for a few e-fold of expansion, and the universe warms up to a high temperature.