-
Notifications
You must be signed in to change notification settings - Fork 0
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.
- 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
Copy the sample pipeline file into your repo:
[samples/powerautodocs.pipeline.sample.yml](https://github.com/lewginn/PowerAutoDocs/blob/main/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.
-
In your ADO project, go to Pipelines in the left nav
-
Click New pipeline
-
Select Azure Repos Git
-
Select your repository
-
Choose Existing Azure Pipelines YAML file
-
Set the path to
.azuredevops/powerautodocs.yml -
Click Continue, then Save (don't run it yet)
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:
WIKI_PAT
A Personal Access Token that gives the pipeline permission to write to your ADO Wiki.
To create one:
-
In ADO, click your profile picture (top right) → Personal access tokens
-
Click New Token
-
Give it a name (e.g.
PowerAutoDocs) -
Set the expiry to suit your project
-
Under Scopes, select Wiki → Read & Write
-
Click Create and copy the token
Paste the token as the value of WIKI_PAT in your pipeline variables. Tick Keep this value secret.
| 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.
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.
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: noneRun on every push to main
trigger:
branches:
include:
- mainScheduled — e.g. every weekday morning
schedules:
- cron: "0 7 * * 1-5"
displayName: Weekday morning run
branches:
include:
- main
always: trueBy 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
Getting Started
Configuration
Reference