LaTeX documents accessible in the repository with CI

LaTeX is a very popular and in my opinion an optimal tool for creating documents larger than a couple of pages. It is often used for technical documentation and kept in a version control system, such as git. Usually, only LaTeX source files are stored in a repository, unlike the final PDF files. But is there a way to make a generated PDF document always up to date and accessible in the repository, without versioning the actual file? It turns out that it’s possible with continuous integration (CI).