# Documenter workflow question

**URL:** <https://discourse.julialang.org/t/documenter-workflow-question/19242>\
**Category:** General Usage\
**Tags:** documenter\
**Created:** [January 3, 2019, 5:52pm UTC](https://discourse.julialang.org/t/documenter-workflow-question/19242 "2019-01-03T17:52:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![crbinz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crbinz/32/1919_2.png) [@crbinz](https://discourse.julialang.org/u/crbinz)\
**Post date:** [January 3, 2019, 5:52pm UTC](https://discourse.julialang.org/t/documenter-workflow-question/19242/1 "2019-01-03T17:52:13Z")

</div>

I’ve started using [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl) to build up documentation for a (non-public) package I maintain. Because of the somewhat limited tools available to me and my team, I think I’ve come to the conclusion that the best way to allow users to access the docs is to keep them in the repository itself as markdown files (similar to what [HDF5.jl does](https://github.com/JuliaIO/HDF5.jl/blob/master/doc/hdf5.md) does.

I’m trying to figure out the best workflow for keeping the docs up to date, though. I have CI set up on our local Gitlab server for testing, and it would be nice to have that process also build/update the docs, but if the resulting markdown files are to be kept in the repo itself, I’m not sure there’s a way to do it that way.

Am I limited to just manually building the docs each time they’re updated and committing the new markdown files to the repository? Or is there a better way?

---

<div class="post-metadata">

**Author:** ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)\
**Post date:** [January 4, 2019, 3:27am UTC](https://discourse.julialang.org/t/documenter-workflow-question/19242/2 "2019-01-04T03:27:08Z")

</div>

If I understand correctly, then you have the usual Documenter workflow. You can run Documenter automatically after the tests and have the CI deploy the built docs somewhere. For more details, see [Hosting Documetation in Documenter’s manual](https://juliadocs.github.io/Documenter.jl/dev/man/hosting/). The environment variables that control `deplydocs` are documented in [its docstring](https://juliadocs.github.io/Documenter.jl/dev/lib/public/#Documenter.deploydocs).

The only thing is that Documenter is quite GitHub & Travis-specific at the moment, but it should not be too hard to work around that. You just need to use e.g. [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/) instead and set up the “Travis” environment variables yourself in the CI config.

I am curious to hear about what your experiences are with setting up Documenter on GitLab. I would actually like to generalize Documenter’s API a bit to make it more straightforward to use it on other Git hosting & CI services (e.g. GitLab, Bitbucket).

---

<div class="post-metadata">

**Author:** ![crbinz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crbinz/32/1919_2.png) [@crbinz](https://discourse.julialang.org/u/crbinz)\
**Post date:** [January 4, 2019, 3:44am UTC](https://discourse.julialang.org/t/documenter-workflow-question/19242/3 "2019-01-04T03:44:35Z")

</div>

Thanks for your reply. Indeed, Gitlab Pages would probably be the way to go for me, but it’s not configured on our Gitlab instance (and that isn’t likely to change). My current proposed workaround is to keep the generated markdown files (from `DocumenterMarkdown`) in the repository (since Gitlab will render them), then just link to them from the README or something.

In general, my experience setting up Documenter on Gitlab was positive, with most of the hangups being on the Gitlab side rather than the Documenter configuration side. I primarily used @Tamas_Papp’s (very helpful) [GitlabJuliaDemo.jl](https://gitlab.com/tkpapp/GitlabJuliaDemo.jl/blob/master/.gitlab-ci.yml) as a guide.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 4, 2019, 6:30am UTC](https://discourse.julialang.org/t/documenter-workflow-question/19242/4 "2019-01-04T06:30:48Z")

</div>

I have updated GitlabJuliaDemo.jl recently to 1.x and project-based Documenter workflow, if you find something is not working/missing please open an issue there.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 4, 2019, 7:29am UTC](https://discourse.julialang.org/t/documenter-workflow-question/19242/5 "2019-01-04T07:29:39Z")

</div>

Also, note that skeleton.jl now generates the control file for Gitlab.

[https://github.com/tpapp/skeleton.jl](https://github.com/tpapp/skeleton.jl)
