Skip to content

Commit

Permalink
Use project to build Documenter docs (JuliaLang#480)
Browse files Browse the repository at this point in the history
* Use project to build Documenter docs

This should also fix building the docs, which haven't been deployed for one year.

* Fix
  • Loading branch information
nalimilan authored and ararslan committed Apr 15, 2019
1 parent b3cbc8c commit 77c9cf4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,14 @@ git:
# - julia -e 'Pkg.clone(pwd()); Pkg.build("StatsBase"); Pkg.test("StatsBase"; coverage=true)'
after_success:
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())';
- julia -e 'using Pkg; Pkg.add("Documenter"); include(joinpath("docs", "make.jl"))'
jobs:
include:
- stage: "Documentation"
julia: 1.0
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()'
- julia --project=docs/ docs/make.jl
after_success: skip

5 changes: 5 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "~0.22"
14 changes: 7 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
using Documenter, StatsBase, Statistics, Random

# Workaround for JuliaLang/julia/pull/28625
if Base.HOME_PROJECT[] !== nothing
Base.HOME_PROJECT[] = abspath(Base.HOME_PROJECT[])
end

makedocs(
format = :html,
sitename = "StatsBase.jl",
modules = [StatsBase],
pages = ["index.md",
Expand All @@ -23,9 +27,5 @@ makedocs(
)

deploydocs(
repo = "github.com/JuliaStats/StatsBase.jl.git",
target = "build",
julia = "1.0",
deps = nothing,
make = nothing
)
repo = "github.com/JuliaStats/StatsBase.jl.git"
)

0 comments on commit 77c9cf4

Please sign in to comment.