|
21 | 21 | default: "1" |
22 | 22 | required: false |
23 | 23 | 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: '' |
24 | 28 | self-hosted: |
25 | 29 | description: "Run the job needs on a self hosted machine" |
26 | 30 | default: false |
@@ -58,25 +62,39 @@ jobs: |
58 | 62 | runs-on: "${{ inputs.self-hosted && 'self-hosted' || inputs.os }}" |
59 | 63 | steps: |
60 | 64 | - uses: actions/checkout@v4 |
61 | | - |
62 | 65 | - name: "Setup Julia ${{ inputs.julia-version }}" |
63 | 66 | uses: julia-actions/setup-julia@v2 |
64 | 67 | with: |
65 | 68 | version: "${{ inputs.julia-version }}" |
66 | 69 |
|
67 | | - - uses: julia-actions/cache@v1 |
| 70 | + - uses: julia-actions/cache@v2 |
68 | 71 | if: "${{ inputs.cache }}" |
69 | 72 | with: |
70 | 73 | token: "${{ secrets.GITHUB_TOKEN }}" |
71 | 74 |
|
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) |
75 | 93 | - name: "Build and Deploy Documentation" |
76 | 94 | env: |
77 | 95 | GITHUB_TOKEN: ${{ inputs.github-token || secrets.GITHUB_TOKEN }} |
78 | 96 | 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 |
80 | 98 |
|
81 | 99 | - uses: julia-actions/julia-processcoverage@v1 |
82 | 100 | if: "${{ inputs.coverage }}" |
|
0 commit comments