Publish markdown page on wiki automatically

Hi everyone,

I would like to keep my wiki pages under docs folder in source code. I have several .md files. Is there a way to deploy these files under project wiki page, especially by using gitlab ci? or do you recommend a better way to achieve this goal? Thanks for you answers.

Here’s an idea. Since the wiki is also a Git repository, you can have a CI job that:

  1. Initiates a Git repo in docs/, like git init
  2. Add all files and commit them
  3. Add the remote of the wiki repo
  4. Push to that repo

What you’d need to find out is the credentials during Git push. You could either use a deploy key with write access or do sth else. I haven’t tested this, that’s just from the top of my head.