DEV Community

paperquire
paperquire

Posted on • Originally published at paperquire.com

PaperQuire Render Action — PDFs in Your CI Pipeline

Your docs should build themselves

You write your documentation in Markdown. You keep it in a Git repo. Every time someone updates a spec or runbook, someone else has to open PaperQuire (or the CLI), render the PDF, and upload it somewhere.

That manual step is now gone. The PaperQuire Render Action generates branded, print-ready PDFs directly in your GitHub Actions workflow — on every push, every PR, or every release.

One step. That's it.

- uses: paperquire/render-action@v1
  with:
    files: 'docs/*.md'
    template: executive-report
    output: build/pdfs
Enter fullscreen mode Exit fullscreen mode

Every Markdown file matching the glob is rendered to PDF using the same Chromium engine as the desktop app. Same templates, same quality, no Pandoc or LaTeX to install.

What you can build

Auto-generate docs on push

Whenever someone pushes to docs/, produce fresh PDFs and attach them as build artifacts:

name: Generate PDFs

on:
  push:
    paths:
      - 'docs/**/*.md'

jobs:
  render:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: paperquire/render-action@v1
        with:
          files: 'docs/*.md'
          template: minimal-clean
          output: build/pdfs

      - uses: actions/upload-artifact@v4
        with:
          name: pdfs
          path: build/pdfs/
Enter fullscreen mode Exit fullscreen mode

Team members download the latest PDFs from the Actions tab. No Slack messages, no "can you re-export this?"

Attach PDFs to releases

Ship documentation alongside your code:

- uses: paperquire/render-action@v1
  with:
    files: 'docs/*.md'
    template: executive-report
    output: dist/

- name: Upload to release
  env:
    GH_TOKEN: ${{ github.token }}
  run: gh release upload ${{ github.event.release.tag_name }} dist/*.pdf
Enter fullscreen mode Exit fullscreen mode

Every release automatically includes the latest versions of your specs, guides, and reports.

PR previews

Use the action in pull request workflows so reviewers can download rendered PDFs before merging:

on:
  pull_request:
    paths: ['docs/**']

jobs:
  preview:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: paperquire/render-action@v1
        with:
          files: 'docs/*.md'
          output: preview/
      - uses: actions/upload-artifact@v4
        with:
          name: pdf-preview
          path: preview/
Enter fullscreen mode Exit fullscreen mode

Inputs and outputs

Three inputs — only files is required:

Input Default Description
files Glob pattern (e.g. docs/*.md, **/*.md)
template minimal-clean Any built-in template ID
output output/ Where to write PDFs

The action outputs pdf-files — a newline-separated list of generated paths you can reference in later steps:

- uses: paperquire/render-action@v1
  id: render
  with:
    files: 'docs/*.md'

- run: echo "${{ steps.render.outputs.pdf-files }}"
Enter fullscreen mode Exit fullscreen mode

How it works under the hood

The action runs in a Docker container with Node.js and all Chromium dependencies pre-installed. It globs your files, runs paperquire render for each one, and collects the output paths. No shell tricks, no external binaries to install — everything is baked into the image.

The Docker image is published to GHCR (ghcr.io/paperquire/render-action), so subsequent runs pull from cache instead of rebuilding.

Get started

  1. Add the step to your workflow (copy the YAML above)
  2. Push to your repo
  3. Check the Actions tab for your PDFs

Full documentation: GitHub Action docs

Action source: paperquire/render-action

Top comments (0)