Skip to content

Commit 532fd73

Browse files
authored
Simplify process to builds docs (#554)
Use `[sources]` section of `docs/Project.toml` instead of messing with `LOAD_PATH`.
1 parent 0a49276 commit 532fd73

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,24 +143,22 @@ jobs:
143143
with:
144144
version: '1'
145145
- uses: julia-actions/cache@v2
146-
- run: |
146+
- name: Instantiate docs environment
147+
run: |
147148
julia --color=yes --project=docs -e '
148149
using Pkg
149-
Pkg.develop([
150-
PackageSpec(path=pwd()),
151-
PackageSpec("Reactant_jll"),
152-
PackageSpec(path="lib/ReactantCore")
153-
])
154150
Pkg.instantiate()'
155151
env:
156152
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
157-
- run: |
153+
- name: Run doctests
154+
run: |
158155
julia --color=yes --project=docs -e '
159156
using Documenter: DocMeta, doctest
160157
using Reactant
161158
DocMeta.setdocmeta!(Reactant, :DocTestSetup, :(using Reactant); recursive=true)
162159
doctest(Reactant)'
163-
- run: julia --color=yes --project=docs docs/make.jl
160+
- name: Build documentation
161+
run: julia --color=yes --project=docs docs/make.jl
164162
env:
165163
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166164
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

docs/Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
44
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
5+
Reactant = "3c362404-f566-11ee-1572-e11a4b42c853"
6+
ReactantCore = "a3311ec8-5e00-46d5-b541-4f83e724a433"
57
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
68

79
[compat]
810
Documenter = "1.4.1"
11+
12+
[sources]
13+
Reactant = {path = ".."}
14+
ReactantCore = {path = "../lib/ReactantCore"}

docs/make.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
pushfirst!(LOAD_PATH, joinpath(@__DIR__, ".."))
2-
pushfirst!(LOAD_PATH, joinpath(@__DIR__, "../lib/ReactantCore/"))
3-
41
using Reactant, ReactantCore
52
using Documenter, DocumenterVitepress
63

0 commit comments

Comments
 (0)