From 08b42bf6d9802967f6a550f20895f985e8fba2c9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Mar 2026 20:58:39 +0000 Subject: [PATCH] docs: add FAQ entry for sparse checkout in large monorepos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #21630 — adds a Configuration & Setup FAQ entry explaining how to use checkout.sparse-checkout to speed up workflows on large monorepos. Co-Authored-By: Claude Sonnet 4.6 --- docs/src/content/docs/reference/faq.md | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/src/content/docs/reference/faq.md b/docs/src/content/docs/reference/faq.md index 2eb6db3c1c2..a8013d28e6e 100644 --- a/docs/src/content/docs/reference/faq.md +++ b/docs/src/content/docs/reference/faq.md @@ -393,6 +393,36 @@ gh aw compile my-workflow See [Imports](/gh-aw/reference/imports/) for full documentation on the `imports:` field. +### My workflow checkout is very slow because my repository is a large monorepo. How can I speed it up? + +Use **sparse checkout** to only fetch the parts of the repository that your workflow actually needs. This can reduce checkout time from tens of minutes to seconds for large monorepos. + +Configure `sparse-checkout` in your workflow frontmatter using the `checkout:` field: + +```yaml wrap +checkout: + sparse-checkout: | + node/my-package + .github +``` + +This generates a checkout step that only downloads the specified paths, dramatically reducing clone size and time. + +For cases where you need multiple parts of a monorepo with different settings, you can combine checkouts: + +```yaml wrap +checkout: + - sparse-checkout: | + node/my-package + .github + - repository: org/shared-libs + path: ./libs/shared + sparse-checkout: | + defaults/ +``` + +The `sparse-checkout` field accepts newline-separated path patterns compatible with `actions/checkout`. See [Cross-Repository Operations](/gh-aw/reference/cross-repository/#checkout-configuration-options) for the full list of checkout configuration options. + ## Workflow Design ### Should I focus on one workflow, or write many different ones?