今日已更新 412 条资讯 | 累计 19972 条内容
关于我们

Docs as Code: Build a CI/CD Pipeline for Your Documentation

paperquire 2026年06月26日 05:37 3 次阅读 来源:Dev.to

Your code has CI/CD. Your docs don't. Every modern engineering team has automated builds, tests, and deployments for their code. But documentation? That's still someone manually exporting a PDF, uploading it to Confluence, and hoping it's the latest version. This post shows you how to treat documentation like code: version-controlled Markdown in a Git repo, automatically rendered to branded PDFs on every push. No manual steps, no stale documents. The stack PaperQuire gives you three tools that work together: .paperquire.yml — project config that locks in your template, branding, and document options CLI — paperquire render and paperquire batch for scripting and local builds GitHub Action — paperquire/render-action for automated builds in CI Each one builds on the previous. The config file means no one has to remember flags. The CLI means you can test locally. The action means it happens automatically. Step 1: Add a project config Drop a .paperquire.yml in your repo root. Every render — GUI, CLI, and CI — picks up these settings automatically: template : corporate toc : true toc-depth : 3 h1-page-break : true cover : title : " Project Documentation" author : " Engineering Team" branding : primary-color : " #2563eb" This is your single source of truth for how documents look. Change it once, and every PDF across every environment updates. Step 2: Test locally with the CLI Before committing, verify your docs render correctly: # Render a single file paperquire docs/architecture.md -o out/architecture.pdf # Batch render the entire docs directory paperquire batch ./docs -o ./out # Dry run — validate without producing output paperquire batch ./docs --dry-run The CLI reads .paperquire.yml automatically. The output is identical to what CI will produce. Step 3: Automate with the GitHub Action Add one workflow file and your docs build themselves: # .github/workflows/docs.yml name : Build Documentation on : push : paths : - ' docs/**/*.md' - ' .paperquire.yml' jobs : render : ru

本文内容来源于互联网,版权归原作者所有
查看原文