Skip to content

Commit 77c9cf4

Browse files
nalimilanararslan
authored andcommitted
Use project to build Documenter docs (#480)
* Use project to build Documenter docs This should also fix building the docs, which haven't been deployed for one year. * Fix
1 parent b3cbc8c commit 77c9cf4

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

.travis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,14 @@ git:
1717
# - julia -e 'Pkg.clone(pwd()); Pkg.build("StatsBase"); Pkg.test("StatsBase"; coverage=true)'
1818
after_success:
1919
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())';
20-
- julia -e 'using Pkg; Pkg.add("Documenter"); include(joinpath("docs", "make.jl"))'
20+
jobs:
21+
include:
22+
- stage: "Documentation"
23+
julia: 1.0
24+
os: linux
25+
script:
26+
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
27+
Pkg.instantiate()'
28+
- julia --project=docs/ docs/make.jl
29+
after_success: skip
30+

docs/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
4+
[compat]
5+
Documenter = "~0.22"

docs/make.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
using Documenter, StatsBase, Statistics, Random
22

3+
# Workaround for JuliaLang/julia/pull/28625
4+
if Base.HOME_PROJECT[] !== nothing
5+
Base.HOME_PROJECT[] = abspath(Base.HOME_PROJECT[])
6+
end
7+
38
makedocs(
4-
format = :html,
59
sitename = "StatsBase.jl",
610
modules = [StatsBase],
711
pages = ["index.md",
@@ -23,9 +27,5 @@ makedocs(
2327
)
2428

2529
deploydocs(
26-
repo = "github.com/JuliaStats/StatsBase.jl.git",
27-
target = "build",
28-
julia = "1.0",
29-
deps = nothing,
30-
make = nothing
31-
)
30+
repo = "github.com/JuliaStats/StatsBase.jl.git"
31+
)

0 commit comments

Comments
 (0)