diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-02-17 12:34:23 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-02-17 12:34:23 +0000 |
commit | 2a4e866a43e3db1e2be8e2a3d986ddc9f855d2bc (patch) | |
tree | 7b2e8ea902672f6c354f2f36635444b2b5fba30d | |
parent | bda0839734bad8351e1dbc9c7beb8ae1f00d831e (diff) | |
download | libgit2-2a4e866a43e3db1e2be8e2a3d986ddc9f855d2bc.tar.gz |
ci: publish documentation after merge
When a continuous integration build runs (ie a commit is pushed or
merged into one of the CI branches, `master` or `maint/*`) then push the
rebuilt documentation into the `gh-pages` branch.
-rw-r--r-- | azure-pipelines.yml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a37319adf..415210633 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -134,6 +134,7 @@ jobs: docker run --rm -v /home/vsts/work/1/s:/src -w /src libgit2/docurium:test cm doc api.docurium git checkout gh-pages cp -R * '$(Build.BinariesDirectory)' + displayName: 'Generate Documentation' - task: archivefiles@2 displayName: 'Archive Documentation' inputs: @@ -141,7 +142,10 @@ jobs: includeRootFolder: false archiveFile: '$(Build.ArtifactStagingDirectory)/api-documentation.zip' - task: publishbuildartifacts@1 - displayName: 'Upload Documentation' + displayName: 'Upload Documentation Artifact' inputs: pathToPublish: '$(Build.ArtifactStagingDirectory)' artifactName: 'docs' + - script: git push origin gh-pages + displayName: 'Publish Documentation' + condition: eq(variables['Build.Reason'], 'IndividualCI') |