File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -130,18 +130,28 @@ jobs:
130130 steps :
131131 - script : |
132132 git config user.name 'Documentation Generation'
133- git config user.email 'noreply@libgit2.org'
134- docker run --rm -v /home/vsts/work/1/s:/src -w /src libgit2/docurium:test cm doc api.docurium
133+ git config user.email 'libgit2@users.noreply.github.com'
134+ git branch gh-pages origin/gh-pages
135+ docker run --rm -v $(Build.SourcesDirectory):/src -w /src libgit2/docurium:latest cm doc api.docurium
135136 git checkout gh-pages
136137 cp -R * '$(Build.BinariesDirectory)'
138+ displayName: 'Generate Documentation'
137139 - task : archivefiles@2
138140 displayName : ' Archive Documentation'
139141 inputs :
140142 rootFolderOrFile : ' $(Build.BinariesDirectory)'
141143 includeRootFolder : false
142144 archiveFile : ' $(Build.ArtifactStagingDirectory)/api-documentation.zip'
143145 - task : publishbuildartifacts@1
144- displayName : ' Upload Documentation'
146+ displayName : ' Upload Documentation Artifact '
145147 inputs :
146148 pathToPublish : ' $(Build.ArtifactStagingDirectory)'
147149 artifactName : ' docs'
150+ - script : |
151+ git remote -v
152+ echo 'machine github.com' > ~/.netrc
153+ echo 'login $(GITHUB_USERNAME)' >> ~/.netrc
154+ echo 'password $(GITHUB_PAT)' >> ~/.netrc
155+ git push origin gh-pages
156+ displayName: 'Publish Documentation'
157+ condition: eq(variables['Build.Reason'], 'IndividualCI')
You can’t perform that action at this time.
0 commit comments