make.jl 1.57 KB
Newer Older
Sylvain Arreckx's avatar
Sylvain Arreckx committed
1
using Documenter, COBREXA
2
3
4
5
6
using Literate

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

# generate notebooks
7
8
9
notebooks_path=joinpath(@__DIR__, "src", "notebooks-src")
notebooks = joinpath.(notebooks_path, readdir(notebooks_path))
notebooks_outdir = joinpath(@__DIR__, "src", "notebooks")
10
11
12
13
14
15

folder = "stable"

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

16
17
18
19
20
21
22
23
24
25
for notebook in notebooks
    Literate.markdown(
        notebook,
        notebooks_outdir;
        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(notebook, notebooks_outdir)
end
26

Sylvain Arreckx's avatar
Sylvain Arreckx committed
27

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


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