Skip to content

Running via ADO Pipeline

Lewis Ginn edited this page Jun 9, 2026 · 4 revisions

Running via ADO Pipeline

The ADO pipeline runs PowerAutoDocs automatically inside Azure DevOps. Once set up, it triggers on demand (or on a schedule) and publishes documentation without anyone needing to run anything manually.

ADO provides the Node.js environment — nothing needs to be installed on any machine.

What you need

  • An Azure DevOps project with your solution repo
  • A wiki enabled in the ADO project (go to Project Settings → Overview → Azure DevOps Wiki to enable it if not already on)
  • Permission to create pipelines and pipeline variables in ADO

Step 1 — Add the pipeline file

Copy the sample pipeline file into your repo:

samples/powerautodocs.pipeline.sample.yml → .azuredevops/powerautodocs.yml

Commit and push this file. You don't need to edit it — all the project-specific values come from pipeline variables set in ADO.

Step 2 — Register the pipeline in ADO

  1. In your ADO project, go to Pipelines in the left nav

  2. Click New pipeline

  3. Select Azure Repos Git

  4. Select your repository

  5. Choose Existing Azure Pipelines YAML file

  6. Set the path to .azuredevops/powerautodocs.yml

  7. Click Continue, then Save (don't run it yet)

Step 3 — Add pipeline variables

Pipeline variables are how you pass secrets and configuration to the pipeline without putting them in the YAML file. In your pipeline, click Edit → Variables and add the following:

Required

WIKI_PAT A Personal Access Token that gives the pipeline permission to write to your ADO Wiki.

To create one:

  1. In ADO, click your profile picture (top right) → Personal access tokens

  2. Click New Token

  3. Give it a name (e.g. PowerAutoDocs)

  4. Set the expiry to suit your project

  5. Under Scopes, select WikiRead & Write

  6. Click Create and copy the token

Paste the token as the value of WIKI_PAT in your pipeline variables. Tick Keep this value secret.

Optional

Variable When to add Notes
POWERAUTODOCS_VERSION If you want to pin a specific version e.g. 1.4.0. Leave blank to always use the latest.
ANTHROPIC_API_KEY If using AI enrichment with Anthropic Tick Keep this value secret
AZURE_OPENAI_API_KEY If using AI enrichment with Azure OpenAI Tick Keep this value secret
AZURE_OPENAI_ENDPOINT If using AI enrichment with Azure OpenAI Your Azure OpenAI resource endpoint URL

Secret variables are not automatically passed through to script steps in ADO — they need to be explicitly mapped. The sample pipeline already handles this correctly, so as long as you're using it as your base you don't need to change anything.

Step 4 — Run the pipeline

Go back to your pipeline and click Run pipeline. For the first run, select Manual trigger and run it against your main branch.

Check the pipeline logs to confirm it completes successfully. If you have wiki: true in your config, the wiki pages will appear in ADO under Wiki in the left nav.

Trigger options

The sample pipeline is set to manual trigger by default. You can change this by editing the trigger section of the pipeline YAML:

Manual only (default)

trigger: none

Run on every push to main

trigger:
  branches:
    include:
      - main

Scheduled — e.g. every weekday morning

schedules:
  - cron: "0 7 * * 1-5"
    displayName: Weekday morning run
    branches:
      include:
        - main
    always: true

Config file location

By default the pipeline looks for doc-gen.config.yml in the repo root. If yours is somewhere else, add DOC_GEN_CONFIG_DIR to your pipeline variables and set it to the directory containing the config file:

DOC_GEN_CONFIG_DIR = $(Build.SourcesDirectory)/config

Clone this wiki locally