diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 6b42936..c345e8e 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,23 +1,27 @@ name: Documentation + on: push: - branches: [main] + branches: + - main # update to match your development branch (master, main, dev, trunk, ...) tags: '*' pull_request: - types: [opened, synchronize, reopened] + jobs: build: + permissions: + contents: write + statuses: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v1 with: - # Build documentation on Julia 1.6 version: '1.6' - 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 + 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 6b6bb40..6b36ebc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ ![CI](https://github.com/SPSUnipi/EnergyCommunity.jl/actions/workflows/CI.yml/badge.svg) +[![Docs dev](https://img.shields.io/badge/docs-latest-blue.svg)](https://spsunipi.github.io/EnergyCommunity.jl/dev/) +[![Docs stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://spsunipi.github.io/EnergyCommunity.jl/stable/) # EnergyCommunity.jl Optimization of Energy Communities becomes easy with EnergyCommunity.jl! diff --git a/docs/Project.toml b/docs/Project.toml index 8ff5aa1..e0e367b 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -18,3 +18,6 @@ SankeyPlots = "8fd88ec8-d95c-41fc-b299-05f2225f2cc5" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" XLSX = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0" YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" + +[compat] +Documenter = "1.1" diff --git a/docs/make.jl b/docs/make.jl index b2b31e4..699fe82 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -3,6 +3,9 @@ using Documenter using Literate using Test +# Deactivate Plots display output on server +ENV["GKSwstype"] = "100" + const _EXAMPLE_DIR = joinpath(@__DIR__, "src", "examples") """