"Build Documentation" Workflow cannot find module material.extensions
#7523
-
ContextI am trying to run Materials for MkDocs on a private repo, only issue is that the "Build Documentation" Workflow, which I would like to keep using for future internal PR validation, keeps failing for odd reasons. Bug descriptionWhen forking squidfunk/mkdocs-material, the workflow "Build Documentation" will always fail with the following error:
When running Related linksReproductionNo minimal reproduction available, issue reproduction requires running Workflows on an unmodified Fork of squidfunk/mkdocs-material. Steps to reproduce
BrowserNo response Before submitting
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello @mrschick, It turns out that mkdocs-material/.github/workflows/documentation.yml Lines 45 to 49 in 8df393d It works in the mkdocs-material/.github/workflows/documentation.yml Lines 89 to 90 in 8df393d My suggestion would be to use the recommended publishing workflow: as the workflow from the repository has more of such "hacks" that shouldn't be copied "just because" it's used here. Note In the coming days I'm planning to make a PR with cache handling updates for the publishing guide workflow, so please keep in mind that it will be updated. |
Beta Was this translation helpful? Give feedback.
-
Converting to discussion. |
Beta Was this translation helpful? Give feedback.
Hello @mrschick,
I tested it on my fork and got the same results:
It turns out that
import material
(and this happens when MkDocs loads the theme) loads thematerial
directory as thematerial
module. And because of the sparse-checkout the initial checkout doesn't include the fullmaterial
directory and therefore it doesn't work on forks.mkdocs-material/.github/workflows/documentation.yml
Lines 45 to 49 in 8df393d
It works in the
mkdocs-material
repository, because it fetch…