Skip to content

Commit b1ab21e

Browse files
committed
update documentation action
1 parent 9e6335e commit b1ab21e

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

.github/workflows/Documentation.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ on:
2121
default: "1"
2222
required: false
2323
type: string
24+
localregistry:
25+
description: 'Add local registries hosted on GitHub. Specified by providing the url (https/ssh) to the repositories as a newline (\n) seperated list.
26+
User is responsible for setting up the necessary SSH-Keys to access the repositories if necessary.'
27+
default: ''
2428
self-hosted:
2529
description: "Run the job needs on a self hosted machine"
2630
default: false
@@ -58,25 +62,39 @@ jobs:
5862
runs-on: "${{ inputs.self-hosted && 'self-hosted' || inputs.os }}"
5963
steps:
6064
- uses: actions/checkout@v4
61-
6265
- name: "Setup Julia ${{ inputs.julia-version }}"
6366
uses: julia-actions/setup-julia@v2
6467
with:
6568
version: "${{ inputs.julia-version }}"
6669

67-
- uses: julia-actions/cache@v1
70+
- uses: julia-actions/cache@v2
6871
if: "${{ inputs.cache }}"
6972
with:
7073
token: "${{ secrets.GITHUB_TOKEN }}"
7174

72-
- name: "Install Dependencies"
73-
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
74-
75+
- name: Setup project
76+
shell: julia --project=docs --color=yes {0}
77+
run: |
78+
import Pkg
79+
Pkg.develop(PackageSpec(path=pwd()))
80+
if VERSION >= v"1.8-"
81+
Pkg.Registry.add()
82+
else
83+
Pkg.Registry.add("General")
84+
end
85+
if !isempty("$${{ inputs.localregistry }}")
86+
local_repos = split("${{ inputs.localregistry }}", "\n") .|> string
87+
for repo_url in local_repos
88+
isempty(repo_url) && continue
89+
Pkg.Registry.add(Pkg.RegistrySpec(; url=repo_url))
90+
end
91+
end
92+
retry(Pkg.build)(verbose=true)
7593
- name: "Build and Deploy Documentation"
7694
env:
7795
GITHUB_TOKEN: ${{ inputs.github-token || secrets.GITHUB_TOKEN }}
7896
DOCUMENTER_KEY: ${{ inputs.documenter-key || secrets.DOCUMENTER_KEY }}
79-
run: ${{ inputs.debug-documenter && 'JULIA_DEBUG="Documenter"' || '' }} julia --project=docs/ ${{ inputs.coverage && '--code-coverage=user' }} docs/makedocs.jl
97+
run: ${{ inputs.debug-documenter && 'JULIA_DEBUG="Documenter"' || '' }} julia --project=docs/ ${{ inputs.coverage && '--code-coverage=user' }} docs/make.jl
8098

8199
- uses: julia-actions/julia-processcoverage@v1
82100
if: "${{ inputs.coverage }}"

0 commit comments

Comments
 (0)