make.jl 1.37 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
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"

cylon-x's avatar
cylon-x committed
15
16
17
18
19
20
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)",
21
22
23
)
Literate.notebook(EXAMPLE, OUTPUT)

Sylvain Arreckx's avatar
Sylvain Arreckx committed
24

St. Elmo's avatar
St. Elmo committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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",
39
40
        "Tutorials" => "tutorials.md",
        "Function reference" => "functions.md",
St. Elmo's avatar
St. Elmo committed
41
42
43
        "How to contribute" => "howToContribute.md",
    ],
)
44
45
46
47
48
49


# deploydocs(
#     repo = "github.com/$(ENV["TRAVIS_REPO_SLUG"])",
#     push_preview=true,
#     deploy_config = deployconfig,
cylon-x's avatar
cylon-x committed
50
# )