-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
81 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Documentation | ||
on: | ||
push: | ||
branches: [master] | ||
tags: '*' | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
# Build documentation on the latest Julia 1.x | ||
version: '1' | ||
- name: Install dependencies | ||
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); | ||
Pkg.develop(PackageSpec(path=pwd()))' | ||
- name: Build and deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token | ||
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key | ||
run: julia --project=docs/ docs/make.jl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# Dionysos | ||
|
||
| **Build Status** | | ||
|:----------------:| | ||
| [![Build Status][build-img]][build-url] [![Codecov branch][codecov-img]][codecov-url] | | ||
| **Documentation** | **Build Status** | | ||
|:-----------------:|:----------------:| | ||
| [![][docs-stable-img]][docs-stable-url] | [![Build Status][build-img]][build-url] | | ||
| [![][docs-latest-img]][docs-latest-url] | [![Codecov branch][codecov-img]][codecov-url] | | ||
|
||
[build-img]: https://github.com/blegat/Dionysos.jl/workflows/CI/badge.svg?branch=master | ||
[build-url]: https://github.com/blegat/Dionysos.jl/actions?query=workflow%3ACI | ||
[codecov-img]: http://codecov.io/github/blegat/Dionysos.jl/coverage.svg?branch=master | ||
[codecov-url]: http://codecov.io/github/blegat/Dionysos.jl?branch=master | ||
[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg | ||
[docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg | ||
[docs-stable-url]: https://dionysos-dev.github.io/Dionysos.jl/stable | ||
[docs-latest-url]: https://dionysos-dev.github.io/Dionysos.jl/dev | ||
|
||
[build-img]: https://github.com/dionysos-dev/Dionysos.jl/workflows/CI/badge.svg?branch=master | ||
[build-url]: https://github.com/dionysos-dev/Dionysos.jl/actions?query=workflow%3ACI | ||
[codecov-img]: http://codecov.io/github/dionysos-dev/Dionysos.jl/coverage.svg?branch=master | ||
[codecov-url]: http://codecov.io/github/dionysos-dev/Dionysos.jl?branch=master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
|
||
[compat] | ||
Documenter = "0.26" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Dionysos | ||
using Documenter, Literate | ||
|
||
const EXAMPLES_DIR = joinpath(@__DIR__, "..", "examples") | ||
const OUTPUT_DIR = joinpath(@__DIR__, "src/generated") | ||
|
||
include(joinpath(EXAMPLES_DIR, "all_examples.jl")) | ||
|
||
for example in EXAMPLES | ||
example_filepath = joinpath(EXAMPLES_DIR, example) | ||
Literate.markdown(example_filepath, OUTPUT_DIR) | ||
Literate.notebook(example_filepath, OUTPUT_DIR) | ||
Literate.script(example_filepath, OUTPUT_DIR) | ||
end | ||
|
||
makedocs( | ||
sitename = "Dionysos", | ||
# See https://github.com/JuliaDocs/Documenter.jl/issues/868 | ||
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"), | ||
# See https://github.com/jump-dev/JuMP.jl/issues/1576 | ||
strict = true, | ||
pages = [ | ||
"Index" => "index.md", | ||
"Examples" => map(EXAMPLES) do jl_file | ||
# Need `string` as Documenter fails if `name` is a `SubString{String}`. | ||
name = string(split(jl_file, ".")[1]) | ||
return name => "generated/$name.md" | ||
end | ||
], | ||
) | ||
|
||
deploydocs( | ||
repo = "github.com/dionysos-dev/Dionysos.jl.git", | ||
push_preview = true, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Dionysos | ||
|
||
[Dionysos](https://github.com/dionysos-dev/Dionysos.jl) implements a solver for the optimal control of cyber-physical systems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
const EXAMPLES = String[] |