Skip to content

Deployment: deploy document AND fail CI #2738

@asinghvi17

Description

@asinghvi17

So currently it's a bit difficult to do this, since users don't have access to doc unless debug=true in makedocs. But here's what I did to make this happen:

doc = makedocs(; debug = true, ...)
deploydocs(...)

# Return with a nonzero exit code if there were any errors
error_set = doc.internal.errors
exit_code = issubset(error_set, (:missing_docs, :cross_references)) ? 0 : 1
exit(exit_code)

I guess this would require a breaking release, but in a hypothetical Documenter v2.0 it would make things much nicer if we could pass doc around - makedocs would return doc and then deploydocs(doc; kwargs...) to avoid a lot of hassle.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions