How to Set Up a Continuous Documentation Pipeline with DeepDocs
DeepDocs helps you automate documentation updates by continuously monitoring your codebase and syncing high-level docs like READMEs, SDK guides, API refs and tutorials.
Unlike Deep Scan, this workflow will run automatically every time you commit a code change to your main or feature branch.
This guide walks you through setting up a continuous documentation pipeline. It will cover cases when your code and docs live in the same repository or they live in separate repositories.
✅ Prerequisites
- Install the DeepDocs GitHub App on:
- Your source code repository
-
And optionally, your external docs repository (if separate)
-
Decide which branch you want DeepDocs to monitor (e.g. a long-lived
feature/preview
ordevelop
branch).
1️⃣ Monorepo Setup: Code and Docs in the Same Repo
In a monorepo setup, both source code and documentation live in the same repo. DeepDocs will monitor changes in a specific branch (e.g. feature/preview
) and update the specified doc files or folders accordingly.
Place a deepdocs.yml
file at the root of your code repository, and commit it to the branch you want DeepDocs to monitor (your sync branch).
Example deepdocs.yml
target:
- url: "docs/"
reinit: "trigger-setup"
ignore: []
2️⃣ Separate Repo Setup: Code and Docs in Different Repos
In this setup, your code and docs live in separate GitHub repositories. DeepDocs must be installed on both.
The deepdocs.yml
config should be added only to the code repository. Do not add it to the docs repo.
You will define the target docs location from your code repo, and DeepDocs will push updates into the docs repo, branching off its default branch (typically main
).
Example deepdocs.yml
target:
- url: "https://github.com/my-org/docs-repo/tree/main/guides/"
reinit: "75vUs2K5"
ignore: []
ℹ️
target.url
: Must be a GitHub URL pointing to the correct file or folder path on themain
branch of the docs repository.
🧩 What happens after committing deepdocs.yml
- On the first commit, DeepDocs runs a Deep Scan of your sync branch to detect outdated docs.
- It creates a branch
deepdocs-update-<commit_sha>
with proposed updates:- If the target is in the same repo, it branches from the sync branch.
- If the target is in an external repo, it branches from the external repo’s default branch (e.g.
main
).
- On future commits, DeepDocs tracks code diffs, updates affected docs, and repeats the process.
- A detailed report is posted as a comment on the commit that triggered the update.
- You can review and merge the changes like any regular PR.
📝 Tips
- Use feature branches (like
feature/preview
) for staging doc changes alongside pre-release code. - Use
ignore
to skip any code files or folders that shouldn’t affect docs sync (e.g. legacy modules, internal-only files). - Trigger deep scans by updating the
reinit
value in the config.
🧪 Example Scenarios
Monorepo with a pre-release branch
target:
- url: "docs/"
reinit: "Xhxp8Z1z"
ignore:
- "old_code/"
Cross-repo setup targeting the docs main branch
target:
- url: "https://github.com/my-org/docs-repo/tree/main/guides/"
reinit: "JYcq4jaD"
ignore: []
🚀 You're All Set
Once configured, DeepDocs will automatically monitor your sync branch, detect doc drift, and propose updates in separate branches—ready for review and merge.