@@ -95,8 +95,6 @@ stages:
9595 - job : javadoc
9696 condition : and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
9797 steps :
98- - checkout : self
99- persistCredentials : true
10098 - script : ./gradlew javadoc
10199 displayName : ' Build JavaDoc'
102100 - script : |
@@ -110,6 +108,7 @@ stages:
110108 git fetch origin
111109 git checkout -b gh-pages origin/gh-pages
112110 mkdir -p $(Build.SourceBranchName)/api
111+ rm -rf $(Build.SourceBranchName)/api/*
113112 cp -r fabric-chaincode-shim/build/docs/javadoc/* $(Build.SourceBranchName)/api
114113 if [ -d gh-pages ]; then
115114 find . -maxdepth 1 ! \( -name [.]* -o -name 'gh-pages' -o -name 'master' -o -name 'release-*' \) -exec rm -rf {} \;
@@ -118,11 +117,11 @@ stages:
118117 fi
119118 displayName: 'Update gh-pages branch'
120119 - script : |
121- git config --local user.name "Azure Pipelines "
122- git config --local user.email "azuredevops@microsoft .com"
120+ git config --global user.email "Hyperledger Bot "
121+ git config --global user.name "hlfdev.azp@gmail .com"
123122 git add -A
124123 git commit -m "Publishing GitHub Pages"
125- git push origin gh-pages
124+ git push https://$(GITHUB-PAT)@github.com/hyperledger/fabric-chaincode-java.git gh-pages
126125 displayName: 'Commit gh-pages changes'
127126
128127 # Publish the snapshot images etc.
0 commit comments