Hi it’s me again!
Context:
I am trying to deploy a very minimal documentation on GitHub using Documenter.jl
. I have managed to deploy my toy documentation if I dont use any Plots.jl
by just following this YouTube tutorial just fine. However, also following that tutorial, if I make a tutorial documentation through a tutorial.jl
like file containing some Plots.jl
usage the GitHub build fails to deploy.
The precise error I get:
This is in GitHub’s “build and deploy” step
(I have shorten the error for readability)
I am puzzled because:
It all works locally
It all works if I comment out the Plots.jl
section.
Above the error, inside GitHub’s “install docs dependencies” step, Plots.jl
clearly manages to precompile!
What’s going on?
I clearly have Plots.jl
in my enviroment…
I can attatch my repo and the full GitHub logs for further details although the set up is essentially that of my previous question
Do you have a separate Project.toml
in the root folder and in the docs
folder?
If so you need to add Plots
to both.
1 Like
@ufechner7 I should have it in both, so this is my repo structure:
── Manifest.toml
── Project.toml
── docs/
│── Manifest.toml
│── make.jl
│── Project.toml
│── src/
│ │── index.md
│ │── exp.md # automatically generated
│ │── experiments/
│ │ │── exp.jl
── src/
│── QuantumGeometricComplexity
│── test.jl
And the entire contents of the top /Project.toml
are:
name = "QuantumGeometricComplexity"
uuid = "123e4567-e89b-12d3-a456-426614174000"
authors = ["Your Name <youremail@example.com>"]
version = "0.1.0"
[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
[compat]
ColorSchemes = "3.27.1"
Documenter = "1.8.0"
Literate = "2.20.1"
Plots = "1.40.9"
and the entire contents of the docs/Project.toml
are:
[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Complete error log: test · acroscarrillo/minimal_working_documenter_example@64eab9f · GitHub
│ The following 3 direct dependencies failed to precompile:
│
│ Plots
│
│ Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "/home/runner/.julia/compiled/v1.11/Plots/jl_J64yZU".
│ ERROR: LoadError: ArgumentError: Package ColorSchemes [35d6a980-a343-548e-a6ea-1d62b119f2f4] is required but does not seem to be installed:
│ - Run `Pkg.instantiate()` to install all recorded dependencies.
Perhaps there is an error in minimal_working_documenter_example/.github/workflows/deploy.yaml at main · acroscarrillo/minimal_working_documenter_example · GitHub
Perhaps this line is needed?
#run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
1 Like
I get this error:
I guess this comes from the fact my Module QuantumGeometricComplexity is not a registered package but this wasnt an issue before.
Perhaps the comment “You just need to make sure that the package is a develop-dependency” on the .yaml
file is relevant?
I do not know how to do this correctly. In my own packages the following section in the CI.yml file works:
docs:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using KiteUtils
DocMeta.setdocmeta!(KiteUtils, :DocTestSetup, :(using KiteUtils); recursive=true)
doctest(KiteUtils)'
Of course you would have to replace KiteUtils
with the name of your own package.
ufechner7:
docs:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using KiteUtils
DocMeta.setdocmeta!(KiteUtils, :DocTestSetup, :(using KiteUtils); recursive=true)
doctest(KiteUtils)'
Issue is that my module is not a package (yet) and it doesnt seem to be documented/structured the same way as yours