Using Documenter.jl

Hello,

I’m trying to deploy some basic documentation for my package ClimateTools.jl using Documenter.jl.

I have an error when trying to run make.jl from the command line

[user@doris docs]$ julia --color=yes /home/user/.julia/v0.5/ClimateTools/docs/make.jl fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). ERROR: LoadError: failed process: Process(git rev-parse --short HEAD, ProcessExited(128)) [128]

I’ve followed the guide and I can’t see where I did something wrong. ssh keys are generated and saved on github and Travis. I do have a gh-pages branch. Though I admit this part is not clear: I do everything on master and it’s Travis that will take care of the gh-pages branch with built docs?.

Right now, you can see the current state of my attempt on the github repo.

I’m really lost right now! Tried various combinations using the “Examples” found in the “Documenter.jl documentation”. No success so far.

Any help or hint will be appreciated! :slight_smile:

I re-did everything and no longer have the “git” problem.

However, documentation does not seem to appear on gh-pages. I think I am lost at the “gh-pages” branch step. I mean, do I need to add the “build” directory on the gh-pages? Since they are in the .gitignore file, I need to add them with the “-f” flag. That’s what I tried and I don’t have more success on this front.

in the repo settings, Github pages is enabled and set on the gh-pages branch. Travis is building right now. We’ll see if it works!

edit - Well, didn’t worked. I’m completely lost now.

edit - Just read that on Documenter.jl documentation:

“Note that the hosted documentation does not update when you make pull requests; you see updates only when you merge to master or push new tags.”

What does it mean actually? I’m using to do simple

git add file1 git commit -m "msg" git push origin master

is that enough or is there another step I need to do to make it happen? Thanks!

I believe you need a deploydocs() function call as well in your make.jl. See for example https://github.com/KristofferC/ContMechTensors.jl/blob/master/docs/make.jl

1 Like

deploydocs will only push updated docs to the repo when the julia = keyword matches one of the versions listed in the travis config. So changing julia = "0.5" to julia = "release" should be sufficient to get it to deploy I think.

1 Like

Thanks! i thought it was there. I guess I modified this file one time too many! I’ve added it now and put julia = “release”, as suggested by @mike

Fingers crossed!

Thanks! It worked! I spend so many hours on that!

Now I need to tag a version so that the stable badge leads to somewhere. :slight_smile: