Skip to content

Commit

Permalink
Merge pull request #714 from JuliaDocs/mp/hosting-docs
Browse files Browse the repository at this point in the history
Update deploydocs on Hosting page
  • Loading branch information
mortenpi authored Apr 23, 2018
2 parents 552aad9 + 7ba7f0d commit e6d29f8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions docs/src/lib/internals/documenter.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

```@docs
Documenter.gitrm_copy
Documenter.git_push
```
27 changes: 18 additions & 9 deletions docs/src/man/hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,40 @@ using Documenter, PACKAGE_NAME
makedocs()
```

We'll need to add an additional call to this file after [`makedocs`](@ref). Add the
following at the end of the file:
We'll need to add an additional function call to this file after [`makedocs`](@ref) which
would perform the deployment of the docs to the `gh-pages` branch.
Add the following at the end of the file:

```julia
deploydocs(
repo = "github.com/USER_NAME/PACKAGE_NAME.jl.git"
repo = "github.com/USER_NAME/PACKAGE_NAME.jl.git",
julia = "0.6"
)
```

where `USER_NAME` and `PACKAGE_NAME` must be set to the appropriate names. Note that `repo`
should not specify any protocol, i.e. it should not begin with `https://` or `git@`.
where `USER_NAME` and `PACKAGE_NAME` must be set to the appropriate names.
Note that `repo` should not specify any protocol, i.e. it should not begin with `https://`
or `git@`.

By default `deploydocs` will deploy the documentation from the `nightly` Julia build for
Linux. This can be changed using the `julia` and `osname` keywords as follows:
Since you are probably testing your package on against multiple Julia versions and on
multiple operating systems, you need to specify which of those builds should be used for
deployment. This is to avoid deploying the same docs multiple times.

The mandatory `julia` keyword argument specifies the Julia version and must be one from
the `julia:` section of your `.travis.yml`.
The operating system defaults to Linux, but can be changed using the `osname` keyword
as follows:

```julia
deploydocs(
deps = Deps.pip("mkdocs", "python-markdown-math"),
repo = "github.com/USER_NAME/PACKAGE_NAME.jl.git",
julia = "0.4",
julia = "nightly",
osname = "osx"
)
```

This will deploy the docs from the OSX Julia 0.4 Travis build bot.
This will deploy the docs from the OSX Julia nightly Travis build bot.

The keyword `deps` serves to provide the required dependencies to deploy
the documentation. In the example above we include the dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/Documenter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ runs `mkdocs build` which populates the `target` directory.
# See Also
The [Hosting Documentation](@ref) section of the manual provides a step-by-step guide to
using the [`deploydocs`](@ref) function to automatically generate docs and push then to
using the [`deploydocs`](@ref) function to automatically generate docs and push them to
GitHub.
"""
function deploydocs(;
Expand Down

0 comments on commit e6d29f8

Please sign in to comment.