Skip to content

Instantly share code, notes, and snippets.

@thepaulmacca
Last active July 5, 2022 10:39
Show Gist options
  • Save thepaulmacca/241331226cdac3e552d9184982ceea23 to your computer and use it in GitHub Desktop.
Save thepaulmacca/241331226cdac3e552d9184982ceea23 to your computer and use it in GitHub Desktop.
Azure Pipelines - Sync Documentation with Azure DevOps Wiki Page
# requires the WIKI Updater Tasks extension https://marketplace.visualstudio.com/items?itemName=richardfennellBM.BM-VSTS-WIKIUpdater-Tasks
trigger:
branches:
include:
- main
paths:
include:
- docs/*
pool:
vmImage: ubuntu-latest
jobs:
- job: UpdateWikiPage
displayName: Update Wiki Page as Build Agent
steps:
- task: WikiFolderUpdaterTask@1
inputs:
repo: '<wiki-repo>'
Filename: '<File-Name.md>'
targetFolder: '<page>'
replaceFile: True
sourceFolder: '$(Build.SourcesDirectory)/docs'
Filter: '**/*.md'
message: 'Update Wiki Page as Build Agent'
gitname: builduser
gitemail: '[email protected]'
localpath: '$(System.DefaultWorkingDirectory)/repo'
useAgentToken: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment