From c85811d19518f19539d52dc5a0c1a34e30de336a Mon Sep 17 00:00:00 2001 From: BRIAN GLEESON Date: Mon, 9 Mar 2026 11:38:18 +0000 Subject: [PATCH] chore: fix gh_token Signed-off-by: BRIAN GLEESON --- .github/workflows/publish.yml | 4 +++- build/publishJavadoc-gha.sh | 18 ++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5bc725c..be2bbf6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,6 +39,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + # ref: gh-pages - name: Set up Java 11 uses: actions/setup-java@v4 @@ -52,7 +53,8 @@ jobs: - name: Publish Javadocs env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REPO_SLUG: ${{ github.repository }} GITHUB_TAG: ${{ github.ref_name}} run: | diff --git a/build/publishJavadoc-gha.sh b/build/publishJavadoc-gha.sh index 15ee237..f9c9816 100755 --- a/build/publishJavadoc-gha.sh +++ b/build/publishJavadoc-gha.sh @@ -9,17 +9,16 @@ printf "\n>>>>> Publishing javadoc for release build: repo=%s tag=%s\n" ${GITHUB printf "\n>>>>> Cloning repository's gh-pages branch into directory 'gh-pages'\n" rm -fr ./gh-pages -git config --global user.email "devxsdk@us.ibm.com" -git config --global user.name "ibm-devx-sdk" -git clone --branch=gh-pages https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git gh-pages -git config --global url."x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git" +# git config --global user.email "devxsdk@us.ibm.com" +# git config --global user.name "ibm-devx-sdk" +# git clone --branch=gh-pages https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git gh-pages +# git config --global url."x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git" # Configure the remote URL with the token for pushing # git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git -printf "\n>>>>> GH version...\n" -gh --version -printf "\n>>>>> GH auth status...\n" -gh auth status +git config --global user.email "devxsdk@us.ibm.com" +git config --global user.name "ibm-devx-sdk" +git clone --branch=gh-pages https://${GH_TOKEN}@github.com/IBM/platform-services-java-sdk.git gh-pages printf "\n>>>>> Finished cloning...\n" pushd gh-pages @@ -39,8 +38,7 @@ printf "\n>>>>> Added files...\n" git commit -m "docs: latest javadoc for ${GITHUB_TAG}" printf "\n>>>>> Committed changes...\n" git remote -v -# git push -f origin gh-pages -git push --repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git" -f gh-pages +git push -f origin gh-pages printf "\n>>>>> Pushed changes...\n" popd