File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 if : (github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release):')) || (github.event_name == 'workflow_dispatch' && inputs.publish_javadoc)
3232
3333 permissions :
34- contents : write
34+ contents : read
3535 pages : write
3636
3737 steps :
5252
5353 - name : Publish Javadocs
5454 env :
55- GH_TOKEN : ${{ secrets.GH_TOKEN }}
55+ # GH_TOKEN: ${{ secrets.GH_TOKEN }}
56+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5657 GITHUB_REPO_SLUG : ${{ github.repository }}
5758 GITHUB_TAG : ${{ github.ref_name}}
5859 run : |
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ printf "\n>>>>> Publishing javadoc for release build: repo=%s tag=%s\n" ${GITHUB
1010printf " \n>>>>> Cloning repository's gh-pages branch into directory 'gh-pages'\n"
1111rm -fr ./gh-pages
1212# TODO this approach doesnt work when using GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} in workflow
13- # git config --global user.email "github-actions[bot]@users.noreply.github.com"
14- # git config --global user.name "github-actions[bot]"
15- # git clone --branch=gh-pages https://${GH_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git gh-pages
16- # TODO For now using a hardcoded token in the repo settings secrets, tied to brian.gleeson@ie.ibm.com
13+ git config --global user.email " github-actions[bot]@users.noreply.github.com"
14+ git config --global user.name " github-actions[bot]"
1715git clone --branch=gh-pages https://${GH_TOKEN} @github.com/${GITHUB_REPO_SLUG} .git gh-pages
16+ # TODO For now using a hardcoded token in the repo settings secrets, tied to brian.gleeson@ie.ibm.com
17+ # git clone --branch=gh-pages https://${GH_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git gh-pages
1818printf " \n>>>>> Finished cloning...\n"
1919
2020gh auth status
You can’t perform that action at this time.
0 commit comments