diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 00000000..c998db39 --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,26 @@ +name: Documentation + +on: + push: + branches: + - iu/api # main # update to match your development branch (master, main, dev, trunk, ...) + tags: '*' + pull_request: + +jobs: + build: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1.9' + - 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 }} # If authenticating with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key + run: julia --project=docs/ docs/make.jl \ No newline at end of file diff --git a/README.md b/README.md index 10ffd1ed..ffc6ab55 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # FastIce.jl +[![Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://PTsolvers.github.io/FastIce.jl/dev) [![CPU CI](https://github.com/PTsolvers/FastIce.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/PTsolvers/FastIce.jl/actions/workflows/ci.yml) [![GPU CI](https://badge.buildkite.com/fac6909b4e3a4183ea260bb54f735ddf0657825a421cc634c7.svg)](https://buildkite.com/julialang/fastice-dot-jl) [![codecov](https://codecov.io/gh/PTsolvers/FastIce.jl/branch/iu/api/graph/badge.svg?token=KDB0GQQDT7)](https://codecov.io/gh/PTsolvers/FastIce.jl) diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..a303fff2 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +build/ +site/ diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 00000000..3a52a5db --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,5 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" + +[compat] +Documenter = "0.27" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 00000000..6c77effb --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,19 @@ +using Documenter +using FastIce + +push!(LOAD_PATH,"../src/") + +makedocs( + sitename = "FastIce", + authors="Ludovic Räss, Ivan utkin and contributors", + format = Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true"), # easier local build + modules = [FastIce], + pages=[ + "Home" => "index.md", + ] +) + +deploydocs( + repo = "github.com/PTsolvers/FastIce.jl.git", + devbranch = "iu/api" #"main" +) diff --git a/docs/src/assets/logo.png b/docs/src/assets/logo.png new file mode 100644 index 00000000..e0c6753c Binary files /dev/null and b/docs/src/assets/logo.png differ diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 00000000..0b8c3323 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,3 @@ +# FastIce.jl + +Documentation for FastIce.jl