'Upload Markdown files to Wiki as part of Azure DevOps Pipeline

As part of an Azure Pipeline to build a Python package and store it in Azure Artifacts I'm generating a lot of .md files from the docstrings as documentation for the package. I'd like to add a step to my pipeline to automatically upload those to the Azure DevOps Wiki. Is this possible? From the official documentation I could only find a way to do it manually from a folder in the repo.



Solution 1:[1]

I ended up cloning the wiki repository and subsequently adding and committing the generated files as part of the pipeline step.

Solution 2:[2]

You can use Rest Api to update Wiki pages: Pages.

Here you can find a sample with PowerShell: https://github.com/ashamrai/AzureDevOpsExtensions/blob/master/CustomPSTasks/UpdateWikiPage.ps1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ga97dil
Solution 2 Shamrai Aleksander