docsforge
One reusable GitHub Actions workflow (10.5 KB, one file) turns any repository into a
self-building documentation pipeline. Drop a .docmeta.yml next to a LaTeX,
Word-via-docx, or Markdown source, add three lines to a caller workflow, and every push
publishes fresh assets to a rolling latest GitHub Release whose download URLs
never change.
How the pipeline works
discover walks the repo for every .docmeta.yml, build
fans them out in parallel (one runner per document, fail-fast:false),
publish collects the artifacts and updates the rolling release.
Design choices
-
Fail-open discovery. Malformed
.docmeta.yml(missingtypeorentry) emits a::warning file=…::annotation and is skipped. The rest of the matrix still ships. -
Registry-safety guard on node-docx. Strips
NPM_TOKEN/NODE_AUTH_TOKEN, forcesNPM_CONFIG_REGISTRYto the public registry, greps the lockfile forjfrog/artifactory/nexus/verdaccio. If a private registry is detected, the lockfile is removed andnpm install --no-audit --no-fundis used instead ofnpm ci. -
Parallel matrix.
strategy.fail-fast:false. N docs → N concurrent runners. One broken document doesn't block the release for the others. -
Concurrency-cancel. concurrency group
docsforge-${{ github.ref }}withcancel-in-progress:true. A fresh push kills the older run for the same branch — pushing twice never doubles the release.
.docmeta.yml — schema
One YAML file sits next to each source document. Four fields, two required.
| Field | Required | Type | Default | Description |
|---|---|---|---|---|
type |
yes | enum | — | One of latex, node-docx, markdown-pandoc. |
entry |
yes | string | — | Path to the source file, relative to the .docmeta.yml. |
output_name |
no | string | parent folder name | Base filename on the release (no extension). |
needs_bibtex |
no | bool | false |
LaTeX only — runs bibtex between compile passes. |
Consumer wiring
Caller workflow
jobs:
build:
uses: OJ-Uday/docsforge/.github/workflows/build-docs.yml@main
Per-document metadata
# thesis/.docmeta.yml
type: latex
entry: main.tex
output_name: Uday_Ojha_Thesis
needs_bibtex: true
Workflow inputs
Four optional inputs on the reusable workflow. Reasonable defaults; overridable per consumer.
| Input | Default | Description |
|---|---|---|
release_tag |
latest |
Tag the rolling release attaches to. Change to publish under a different name. |
release_name |
Latest build |
Human-readable release title. |
commit_previews |
true |
Whether to also publish preview builds per-commit alongside the rolling release. |
artifact_retention_days |
30 |
How long per-doc Actions artifacts stay attached to the run. |