Is there an example build pipeline for Azure DevOps showing how to download the files, run a DocFx Build and then deploy the generated files to an website? Not using Appveyor.
Thanks
Not yet. But it makes sense to create one.
Here is a sample for this. It build repo with DocFX, and publish to Azure Blob to host these web pages. https://dev.azure.com/renzeyu/docfx-azure/_git/docfx-seed?path=%2Fazure-pipelines.yml&version=GBmaster
If you want to host it to GitHub pages, you can replace the AzureFileCopy@3 task to something like git commit, git push. (I tried it but met some issue when calling git.exe in powershell task.)
Brilliant - thanks
If you happen to use Azure Repos + Azure Storage, here is a toy project to help create all the required resources: https://github.com/superyyrrzz/docfx-azure
Here is my repo that uses Azure Pipelines to publish to GitHub Pages:
https://github.com/georgekosmidis/IdentityServer4.Contrib.HttpClientService
Check the _azure-pipelines-master.yml_
Thanks for the tooling, really helpful!
@georgekosmidis Hi. Could you please point me to the yaml with the DocFX build task?
I couldn't find it here: https://github.com/georgekosmidis/IdentityServer4.Contrib.HttpClientService/blob/master/azure-pipelines-master.yml
Hi @MelbourneDeveloper, line 41 in the yml you shared:
- powershell: |
choco install docfx -y
docfx docfx_project/docfx.json
if ($lastexitcode -ne 0){
throw ("Error generating document")
}
displayName: "Documentation"
Is this what you re asking?
@georgekosmidis ah yes! Sorry, I was looking for the build task which you can get from the store, but this installs it with choco which is also good.
Most helpful comment
@georgekosmidis ah yes! Sorry, I was looking for the build task which you can get from the store, but this installs it with choco which is also good.