Deploy Documenter docs locally



As I understand it, the function deploydocs in Documenter.jl is designed to work with travis only. I have a private repository I would like to generate documentation for, and would like a deploydocs function that could deploy my generated documentation when run on my local machine. Anyone having accomplished this before and have some insight/experiences on a nice approach?


If you’re using MkDocs (the default, instead of native HTML), you can simply run the following in the docs directory:

julia make.jl
mkdocs serve

This is assuming you have MkDocs installed, as well as any Python packages you’ve listed in your deploydocs call. Actually, you can keep the server running and only run julia make.jl, as the server will detect the changes and auto-reload and refresh your browser.

If you’re using native HTML, simply open the generated HTML files.


Thanks! That seems to be working well.
I would also be interested in automatic deployment to a git branch, e.g., gh-pages as deploydocs does.


I created a short julia script to set the environment variables the way travis would set them. Need to keep this outside the repository since it contains the deploy key.

ENV["TRAVIS_OS_NAME"] = "linux"
ENV["TRAVIS_TAG"] = "master"
ENV["DOCUMENTER_KEY"] = key not shown

Then modify the make.jl file to include this script is it exists.

if "deploy" in ARGS
  fake_travis = "C:/Users/Chris/fake_travis_LTspice.jl"
  if isfile(fake_travis)
    repo = "",
    target = "site",
    branch = "gh-pages",
    latest = "master",
    osname = "linux",
    julia  = "0.6",
    deps = nothing,
    make = nothing,

Documenter.jl travis.genkeys "which which" error on Windows?

Haven’t tried this, but in theory mkdocs gh-deploy should work.