# Adding Documentation to a GitHub Repository

**URL:** <https://discourse.julialang.org/t/adding-documentation-to-a-github-repository/40405>\
**Category:** Tooling\
**Created:** [May 29, 2020, 9:19am UTC](https://discourse.julialang.org/t/adding-documentation-to-a-github-repository/40405 "2020-05-29T09:19:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![grahamstark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grahamstark/32/5200_2.png) [@grahamstark](https://discourse.julialang.org/u/grahamstark)\
**Post date:** [May 29, 2020, 9:19am UTC](https://discourse.julialang.org/t/adding-documentation-to-a-github-repository/40405/1 "2020-05-29T09:19:14Z")

</div>

Good morning from a very sunny Glasgow, Scotland.

I’m experimenting setting up a Julia package in GitHub, with code coverage and testing using Travis. I’ve been following [Chris Rackauckas’ excellent video](https://www.youtube.com/watch?v=QVmU29rCjaA).

The repository is [here](https://github.com/grahamstark/MiniTB.jl). It’s just a toy thing that’s nonetheless useful for use in testing some economics packages. The package is built using PkgTemplates, with `Documenter{TravisCI}()` selected for document generation.

I’ve:

- got Travis set up, I think correctly,
- got Documenter installed;
- generated and installed keys as per the documenter docs;
- created grahamstark@githib.io as a home for the documents.

If I’ve understood this correctly, the generated docs should turn up at [https://grahamstark.github.io/MiniTB.jl/stable](https://grahamstark.github.io/MiniTB.jl/stable).

I can see that, when it runs, travis is generating [branches on MiniTB with the documentation in them](https://github.com/grahamstark/MiniTB.jl/branches).

My question is: what do I do with these branches? How do I get these pages generated pages on to [https://grahamstark.github.io/MiniTB.jl/stable](https://grahamstark.github.io/MiniTB.jl/stable), preferably automatically?

I appreciate this is probably a naive question for someone who’s comfortable with Git and GitHub, but I’m just not…

Graham

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [May 29, 2020, 10:17am UTC](https://discourse.julialang.org/t/adding-documentation-to-a-github-repository/40405/2 "2020-05-29T10:17:15Z")

</div>

I had similar problems and @Tamas_Papp fixed me up. Look at my tale of confusion at

> [@Trouble with hosting. What am I doing wrong?](https://discourse.julialang.org/t/trouble-with-hosting-what-am-i-doing-wrong/30111):
>
> Hello. I am an utter novice with Documenter and am completely stuck. Thanks in advance for any help. I’m stuck on the hosting part of Documenter.jl. I got the ssh keys where they were supposed to be, which seemed to be easy. I uploaded the /docs directory (except for docs/build) to my repo. That caused a travis build to fail and I can’t see why. I changed .travis.yml as per the directions in Documenter.jl and got another build failure. Then I changed the ENV variables and did % julia make.jl …

It’s a bit subtle. I think “stable” goes with your most recent tag and “dev” goes with your master branch. It is now working ok for me. Look at what I’ve managed to do at

> **[GitHub - ctkelley/SIAMFANLEquations.jl: This is a Julia package of nonlinear...](https://github.com/ctkelley/SIAMFANLEquations.jl)**
>
> This is a Julia package of nonlinear solvers. These codes are used in my book, Solving Nonlinear Equations with Iterative Methods: Solvers and Examples in Julia. - GitHub - ctkelley/SIAMFANLEquatio...

which is still very far from a professional job.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [May 29, 2020, 10:30am UTC](https://discourse.julialang.org/t/adding-documentation-to-a-github-repository/40405/3 "2020-05-29T10:30:11Z")

</div>

> [@ctkelley](#):
>
> I think “stable” goes with your most recent tag and “dev” goes with your master branch.

Correct, so the docs that were built are available here: [https://grahamstark.github.io/MiniTB.jl/dev/](https://grahamstark.github.io/MiniTB.jl/dev/)

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [May 29, 2020, 10:53am UTC](https://discourse.julialang.org/t/adding-documentation-to-a-github-repository/40405/4 "2020-05-29T10:53:00Z")

</div>

And I forgot to also thank @fredrikekre for saving me as well.

@grahamstark once you get it working you will be happy with the results.

---

<div class="post-metadata">

**Author:** ![grahamstark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grahamstark/32/5200_2.png) [@grahamstark](https://discourse.julialang.org/u/grahamstark)\
**Post date:** [May 29, 2020, 2:00pm UTC](https://discourse.julialang.org/t/adding-documentation-to-a-github-repository/40405/5 "2020-05-29T14:00:58Z")

</div>

Brilliant: got it. Didn’t think to check the `dev` branch and, as you say, the `stable` branch duly turned up once I had tagged a release. I’m not 100% (or even 50%) sure what’s really going on here, but it does now work. Many thanks.

Your site is _very_ professional, btw.

Graham
