Reusable GitHub Actions and reusable workflows for Docusaurus documentation sites and awesome-list repositories.
Extracted from duplicated automation across:
Modeled on LLazyEmail/email-template-workflows.
Pin LLazyEmail/documentation-actions@v2 (or a release tag / SHA). With RELEASE_PIN_TOKEN set, each release pins its own actions refs, so a pinned caller runs that release's action code (docs/pinning.md). Draft adoption PRs may use @main only during the adoption window. Prefer full SHA + Renovate for production.
Start here:
- llms.txt — compact entry point
- AGENTS.md — structured playbook with decision trees and pitfalls
- docs/architecture.md — layers and design principles
- docs/reorganization-proposal.md — draft proposal: inventory, pain points and options for restructuring the YAML (nothing decided yet)
- docs/yaml-ai-rules.md — strict YAML rules
- docs/naming.md — short-name aliases and v2 plan
- docs/quickstart-for-agents.md — ultra-concise checklist
- docs/ai-agent-guide.md — step-by-step adoption and extension flows
- docs/examples-guide.md — when to copy which example
- docs/inputs-reference.md — common inputs table
- docs/pinning.md — SHA and
@v2rules, per-release pinning of the actions - docs/troubleshooting.md — symptom / cause / fix, common agent mistakes, and the permissions each caller must grant
- skills/ — focused checklists (see skills/README.md)
- Copy from examples/ — never invent job YAML from scratch
flowchart TD
A[Consumer workflow<br/>triggers + permissions] -->|workflow_call| B[Reusable workflow<br/>.github/workflows/reusable-*.yml]
A -->|uses step| C[Composite action<br/>actions/<name>/]
B --> C
D[examples/] -.->|copy-paste| A
E[skills/] -.->|checklist| A
- Reusable workflows for whole jobs (deploy, changelog, docs-ci, auto-rebase).
- Composite actions for shared steps inside custom jobs.
- Examples are the source of truth for thin callers.
- Inventory is append-only in docs/actions-index.md.
- Prefer short-name aliases: all thirteen listed in docs/naming.md exist (
reusable-pages-deploy,reusable-test-deploy,reusable-readme-sync,reusable-readme-only,reusable-label-conflicts,reusable-pr-report,reusable-thin-content,reusable-image-check,reusable-entry-format,reusable-npm-check,reusable-auto-rebase,reusable-close-superseded,reusable-awesome-checks). Each accepts the same inputs and secrets as its long name (the last four are new:@v2callers can switch once the release that ships them movesv2), andtests/short-name-aliases.test.shkeeps it that way. Alias files are generated fromworkflows.manifest.ymlbyscripts/gen-workflows.py, so new inputs are declared once on the long workflow (see CONTRIBUTING.md).
# Umbrella docs CI (preferred for greenfield)
jobs:
docs-ci:
uses: LLazyEmail/documentation-actions/.github/workflows/reusable-docs-ci.yml@v1
with:
working-directory: website
cache-dependency-path: website/package-lock.json
run-markdownlint: true
run-lychee: true
run-build: true
secrets: inheritMore callers live in examples/.
See the append-only inventory: docs/actions-index.md.
These run on push to main, regenerate a file, and commit it back to main.
Several can fire after the same merge, so they push through
git-push-retry: if main moved, the push is
rejected, the job runs git pull --rebase --autostash origin main, and tries
again (max-attempts, default 5). --autostash keeps unrelated unstaged files
(LFS-smudged media, build output) from aborting the retry. Callers need
permissions: contents: write; nothing else to configure. On main the workflows use the
action at @main; releases cut with per-release pinning point it at the release tag
(docs/pinning.md).
Detailed reference: docs/actions/.
reusable-auto-rebase-prs.yml keeps open PRs current (schedule, push to main
or manual dispatch). Full guide: docs/auto-rebase.md.
| Input | Default | What it does |
|---|---|---|
pr-numbers |
empty (all open PRs) | Comma-separated PRs to update |
rebase-conflicts |
false |
Real git rebase + force-push with SHA lease for conflicting PRs (owner approval). Skips PRs that are already up to date with main |
report-conflicts |
false |
Without rebase-conflicts, one comment per head SHA listing conflicting files |
comment-on-update |
true |
Comment after a successful update |
merge-fallback |
false |
With rebase-conflicts, do a non-force merge update when the rebase conflicts but GitHub says the PR is mergeable |
supersede-fork-prs |
false |
Fork PRs that conflict or can't be updated get a new base-repo PR (supersede/pr-N, body starts with Supersedes #N); never pushes to the fork. If the contributor force-pushes, their current change is synced in as one fast-forward commit. States that need a maintainer are commented on the PR and logged as warnings, not failures |
supersede-union-paths |
empty | Globs (e.g. README.md website/docs/**/*.md) where an addition-only conflict keeps both sides, including later same-repo updates of a supersede PR |
supersede-draft |
true |
Open supersede PRs as drafts |
supersede-sync-message |
thank-you text | With supersede-fork-prs, the comment posted on the contributor's PR (once per head SHA) when their new or rewritten commits are synced into the supersede PR. Placeholders {author}, {sha}, {supersede}, {number} |
delegate-bot-rebase |
false |
Renovate/Dependabot PRs that are behind or conflicting: ask the bot to rebase (tick Renovate's rebase checkbox, or comment @dependabot rebase) instead of a git rebase; logged as delegated, never a failure |
resolve-deleted-on-main |
false |
With rebase-conflicts, accept deletions made on main for files the PR only edited (within resolve-deleted-paths), if that's the only kind of conflict. With merge-fallback, also try a local merge when GitHub says "not mergeable". Dropped files are listed on the PR |
resolve-deleted-paths |
.github/workflows/** |
Globs where resolve-deleted-on-main may drop files |
fail-on-conflict |
true |
false turns unresolvable conflicts during a rebase-conflicts attempt into a warning (job stays green) unless fail-on-skipped-conflicts is also on; the PR still gets the conflict report |
conflict-label |
empty | Label for PRs with conflicts (e.g. has-conflicts, as reusable-label-conflicts uses), including PRs a sweep skips; removed after an update or once the PR no longer conflicts |
fail-on-skipped-conflicts |
false |
Turn the run red when a run leaves a PR with conflicts: skipped by a sweep, reported with report-conflicts, or still conflicting after a rebase-conflicts attempt even if fail-on-conflict is false |
report-failing-checks |
false |
Warn about PRs whose head checks are red, with a "Checks not green" column in the job summary. Check names need checks: read and statuses: read on the job token. Callers of this composite action can grant those on GITHUB_TOKEN. Reusable-workflow callers need AUTO_REBASE_TOKEN, or GitHub's mergeable_state is used |
failing-checks-label |
empty | With report-failing-checks, label PRs whose checks are red (e.g. checks-failing); removed once green |
generated-paths |
empty | Globs of generated files (e.g. docs/pages-index.md). Conflicts there take main's version. A sweep then merges main into a conflicting same-repo PR (merge commit, no force-push) when every conflict is in these files, instead of skipping it. rebase-conflicts and merge-fallback resolve them too (details) |
regenerate-command |
empty | With generated-paths, a command run in the updated checkout to rebuild those files (e.g. node ./scripts/generate-docs-index.mjs); only changed files matching generated-paths are committed. No install step, no tokens in its environment, never run for fork PRs |
list-skipped-conflicts |
true |
Name the conflicting files of PRs a sweep skips, in the log, annotation and summary (found with a local trial merge that pushes nothing) |
secret AUTO_REBASE_TOKEN |
unset | Fine-grained PAT so updated branches re-run CI. Also supplies check names for reusable-workflow callers (permissions) |
Every run ends with an Overview table in the job summary: one row per PR with its status
(updated, up to date, conflict (skipped), conflict (reported), conflict, delegated to bot,
needs a maintainer, failed). When PRs were skipped for conflicts, one warning lists them.
Pair supersede-fork-prs with
reusable-close-superseded-prs.yml
(example): when a PR whose body says
Supersedes #N merges, #N is closed with a thank-you comment (GitHub's
Closes #N keyword does not close PRs).
reusable-sync-feedback.yml is opt-in. Call it from a pull_request_target caller
(example) next to reusable-readme-sync. When a PR, forks
included, changes README.md without the matching docs page, it adds a needs-docs-sync
label and posts one comment. The comment names the docs file, section, neighbouring entry
and the exact line to add, and is edited in place on later pushes. When the PR is in sync,
the label is removed and the comment says "resolved". The job never checks out PR code.
Set post-comment: false on reusable-readme-sync to avoid its older generic comment.
Guide: docs/actions/docs-sync-feedback.md.
Reusable checklists under skills/:
- docusaurus-docs-site — full site setup and hardening.
- See skills/README.md for the full index.
See docs/adoption.md, docs/design.md, and docs/pinning.md.
The root action.yml is an umbrella composite (optional markdownlint + lychee + build). Specialized actions and workflows are used by path.
MIT © LLazyEmail