make.jl 1.35 KB
Newer Older
Sylvain Arreckx's avatar
Sylvain Arreckx committed
1
using Documenter, COBREXA
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using Literate

ENV["TRAVIS_REPO_SLUG"] = "LCSB-BioCore/COBREXA.jl"

# generate notebooks
EXAMPLE = joinpath(@__DIR__, "src/notebooks", "example.jl")
OUTPUT = joinpath(@__DIR__, "src/tutorials")

folder = "stable"

## only temporary - will be removed once public
branch = "gh-pages"

Literate.markdown(EXAMPLE, OUTPUT; repo_root_url = "https://github.com/$(ENV["TRAVIS_REPO_SLUG"])/blob/master",
nbviewer_root_url = "https://nbviewer.jupyter.org/github/$(ENV["TRAVIS_REPO_SLUG"])/blob/gh-pages/$(folder)",
binder_root_url = "https://mybinder.org/v2/gh/$(ENV["TRAVIS_REPO_SLUG"])/$(branch)?filepath=$(folder)"
)
Literate.notebook(EXAMPLE, OUTPUT)

Sylvain Arreckx's avatar
Sylvain Arreckx committed
21

St. Elmo's avatar
St. Elmo committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
makedocs(
    modules = [COBREXA],
    clean = false,
    sitename = "COBREXA.jl",
    format = Documenter.HTML(
        # Use clean URLs, unless built as a "local" build
        prettyurls = !("local" in ARGS),
        assets = ["assets/favicon.ico"],
        highlights = ["yaml"],
    ),
    authors = "The developers of COBREXA.jl",
    linkcheck = !("skiplinks" in ARGS),
    pages = [
        "Home" => "index.md",
36
37
        "Tutorials" => "tutorials.md",
        "Function reference" => "functions.md",
St. Elmo's avatar
St. Elmo committed
38
39
40
        "How to contribute" => "howToContribute.md",
    ],
)
41
42
43
44
45
46
47


# deploydocs(
#     repo = "github.com/$(ENV["TRAVIS_REPO_SLUG"])",
#     push_preview=true,
#     deploy_config = deployconfig,
# )