diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 0000000..5abcfcf --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,29 @@ +name: Documentation + +on: + push: + branches: + - main + - 'release-' + tags: '*' + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@latest + with: + version: '1' + - name: Install dependencies + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - 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/ --code-coverage=user docs/make.jl + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..dfa65cd --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,2 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..01236bc --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,27 @@ +using Documenter + +dir = @__DIR__() * "/.." +cp(joinpath(dir, "README.md"), joinpath(dir, "docs", "src", "index.md"), force = true) + +makedocs(sitename = "SciML Style Guide for Julia", + authors = "Chris Rackauckas", + modules = [], + clean = true, doctest = false, + strict = [ + :doctest, + :linkcheck, + :parse_error, + :example_block, + # Other available options are + # :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block, :footnote, :meta_block, :missing_docs, :setup_block + ], + format = Documenter.HTML(analytics = "UA-90474609-3", + assets = ["assets/favicon.ico"], + canonical = "https://scimlstyle.sciml.ai/stable/"), + pages = [ + "SciML Style Guide for Julia" => "index.md", + ]) + +deploydocs(; + repo = "github.com/SciML/SciMLStyle", + devbranch = "main") diff --git a/docs/src/assets/favicon.ico b/docs/src/assets/favicon.ico new file mode 100644 index 0000000..3c6bd47 Binary files /dev/null and b/docs/src/assets/favicon.ico differ diff --git a/docs/src/assets/logo.png b/docs/src/assets/logo.png new file mode 100644 index 0000000..6f4c3e2 Binary files /dev/null and b/docs/src/assets/logo.png differ