Table of Contents

zkdoc (zkdoc-action)

One of Zeugwerk’s CI/CD tools for TwinCAT. Keeping PLC docs in sync with code is hard when everything is manual. zkdoc generates HTML API docs from your PLC source -write comments in code, push, and publish (e.g. to GitHub Pages) without running DocFX or zkdoc yourself. zkdoc-action is available for all major Git hosts (GitHub, GitLab, Bitbucket) and runs on our CI/CD. For on-premises or licensed use, see zkdoc. Comment syntax: Syntax reference.


Why use it

  • Docs from source - API reference and comments stay in sync with code.
  • Professional output - API docs, examples, and structure in one site.
  • Low maintenance - Builds on every push; no manual doc updates.
  • Searchable - Generated site is indexed and searchable.
  • Deploy anywhere - GitHub Pages, your own server, or any HTTP host.

Quick start

  1. Register - Contact us to register. Public repos get 30 free builds/month.
  2. Add a workflow - The example below is for GitHub; zkdoc-action also works with GitLab CI and Bitbucket Pipelines. Create .github/workflows/docs.yml (or the equivalent in your Git host):
name: Documentation
on:
  push:
    branches: [main, develop]
  workflow_dispatch:
jobs:
  build-docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Generate Documentation
        uses: Zeugwerk/zkdoc-action@v1
        with:
          username: ${{ secrets.ZEUGWERK_USERNAME }}
          password: ${{ secrets.ZEUGWERK_PASSWORD }}
          filepath: '.'
      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v3
        with:
          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          publish_dir: archive/docs/html
  1. Secrets - Set ZEUGWERK_USERNAME and ZEUGWERK_PASSWORD in GitHub Secrets. For GitHub Pages, configure a deploy key (see peaceiris/actions-gh-pages).
  2. Push - Docs build and deploy on every push (or on manual run).

How it works

Your TwinCAT code (with comments) → Git push → zkdoc-action runs on Zeugwerk CI/CD → PLC source is parsed, comments and symbols extracted, DocFX generates HTML → output is in archive/docs/html. Your workflow can then deploy that folder (e.g. to GitHub Pages).

Writing docs in your code

Use /// above POUs, methods, and declarations, and //< next to variables. Full syntax, cross-references, and DocFX options: Syntax reference.

Configuration

Inputs

Input Required Description
username Yes Zeugwerk account username
password Yes Zeugwerk account password
filepath Yes Path to .plcproj or folder containing .Zeugwerk/config.json
doc-folder No Folder with custom docfx.json (e.g. docs/)

Outputs

Artifact Location
HTML docs archive/docs/html/
Build logs GitHub Actions UI

Filepath

  • Single PLC - filepath: 'MyPlcProject/MyPlcProject.plcproj'
  • Zeugwerk / Twinpack projects - filepath: '.' so the action discovers and uses .Zeugwerk/config.json.

Example

struckig: repo, generated docs, workflow.

Pricing

  • Free - 30 builds/month for public repositories.
  • Commercial - Custom pricing for private repos. contact us.

Troubleshooting

  • Docs not generating - Ensure filepath points to a valid .plcproj or a directory with .Zeugwerk/config.json. Check the Actions logs.
  • GitHub Pages not updating - Verify deploy key and GitHub Pages settings (see peaceiris docs).
  • Layout or content wrong - Check docfx.json and comment syntax in Syntax reference.