diff --git a/.github/workflows/BuildDelopyDoc.yml b/.github/workflows/BuildDelopyDoc.yml new file mode 100644 index 0000000..9179209 --- /dev/null +++ b/.github/workflows/BuildDelopyDoc.yml @@ -0,0 +1,31 @@ +name: Build and Deploy Documentation + +on: + push: + branches: + - master + - dev + tags: '*' + pull_request: + +jobs: + build: + permissions: + contents: write + statuses: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v1 + with: + version: '1.9' + - name: Add custom registry + run: | + julia --project=docs/ -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/QEDjl-project/registry.git"));' + julia --project=docs/ -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/JuliaRegistries/General"));' + - 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 + run: julia --project=docs/ docs/make.jl diff --git a/README.md b/README.md index 96b9d5a..8ba2ecb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # QEDprocesses +[![Doc Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://qedjl-project.github.io/QEDprocesses.jl/main) +[![Doc Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://qedjl-project.github.io/QEDprocesses.jl/dev) [![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) ## Installation diff --git a/docs/make.jl b/docs/make.jl index 5e10231..41453ad 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -6,12 +6,14 @@ DocMeta.setdocmeta!(QEDprocesses, :DocTestSetup, :(using QEDprocesses); recursiv makedocs(; modules = [QEDprocesses], authors = "Uwe Hernandez Acosta , Simeon Ehrig, Klaus Steiniger, Tom Jungnickel, Anton Reinhard", - repo = "https://github.com/QEDjl-project/QEDprocesses.jl/blob/{commit}{path}#{line}", + repo = Documenter.Remotes.GitHub("QEDjl-project", "QEDprocesses.jl"), sitename = "QEDprocesses.jl", format = Documenter.HTML(; prettyurls = get(ENV, "CI", "false") == "true", - edit_link = "main", + canonical = "https://qedjl-project.gitlab.io/QEDprocesses.jl", + edit_link = "dev", assets = String[], ), pages = ["Home" => "index.md"], ) +deploydocs(repo = "github.com/QEDjl-project/QEDprocesses.jl.git", push_preview = false)