Repository navigation
Conversation
Pull requests from forks cannot deploy a Documenter preview, so the reusable documentation workflow only reports whether their docs build, and reviewers have no way to look at the rendered pages. Callers of a reusable workflow cannot add steps to its job, so packages that moved from an inline docs workflow (which could upload docs/build itself) to this one lost that option. Add an `upload-artifact` input (default false, so existing callers are unaffected) that uploads docs/build as the `docs-artifact` workflow artifact after a successful build, and an `artifact-retention-days` input (default 3) to control how long it is kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
For pull requests opened from forks,
documentation.ymlcannot deploy a Documenter preview (seeCAN_DEPLOY_DOCS), so the job only reports whether the documentation builds. Reviewers have no way to download and look at the rendered pages. A package with an inline docs workflow can add anactions/upload-artifactstep after the build (Catalyst.jl does), but a caller of a reusable workflow cannot add steps to its job, so packages that switch to this workflow lose that option. This came up for JumpProcesses.jl, whoseDocumentation.ymlnow calls this workflow.Change
Two new optional inputs. The defaults leave existing callers unchanged.
upload-artifactfalsedocs/buildas the workflow artifactdocs-artifact.artifact-retention-days30uses the repository default).The new step runs
actions/upload-artifact@v7right after the build step, before the coverage steps so a coverage problem can't block it. It usescompression-level: 9, andoverwrite: trueso an existing artifact of the same name in the run is replaced instead of failing the upload. Itsif:has no status function, so it runs only when the build succeeded; a failed build has nothing useful to upload. When enabled, it uploads on every successful run (push, tag or pull request), not only for fork pull requests; the short default retention keeps storage small.The README's
documentation.ymlinput table gets the two new rows and a short note on when to use them.Usage
The rendered site then appears as
docs-artifactin the run's Artifacts list.Testing
actionlint1.7.12 (the version this repository's CI uses), with shellcheck, reports no errors for the repository's workflows, and it checks the new step's inputs againstactions/upload-artifact@v7. The new step has not been exercised in a live run yet.Callers on
@v1will pick this up once a newv1.xrelease is tagged.🤖 Generated with Claude Code 2.1.316 (model: claude-opus-5-5)