Generating and commiting files inside the repo using Gitlab CI

Generating files inside the repo using Gitlab CI

I think it would be easier if I try to explain this with a use case.

So let’s say I push a file called ‘doc.tex’ into gitlab. Can I configure the CI to generate the doc in markdown, pdf and html formats and commit them to the repo? So the first time I push the .tex file there are only two files in the repo that is the doc.tex file and the .gitlab-ci.yml file but once the pipeline has finished running the repo will have doc.md, doc.pdf and doc.html in the repo. The next time I push this file to the repo again the files are generated and the changes are commited.

Is it possible to do this using Gitlab CI?
Thanks for reading :slight_smile:

1 Like

I had exactly the same question. I have small script that generates some documentation in a .md file. It would be nice if that is auto committed.
I did not find anything else then doing it via ‘pages’. Any other ideas anyone?