Skip to content

Commit 96b92ea

Browse files
committed
chore: test different branch checkout approach
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
1 parent d8571ae commit 96b92ea

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ jobs:
5050

5151
- name: Publish Javadocs
5252
env:
53-
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
54-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5553
GITHUB_REPO_SLUG: ${{ github.repository }}
5654
GITHUB_TAG: ${{ github.ref_name}}
5755
run: |

build/publishJavadoc-gha.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22

33
# Required environment variables:
4-
# GH_TOKEN
54
# GITHUB_REPO_SLUG
65
# GITHUB_TAG
76

@@ -15,12 +14,16 @@ printf "\n>>>>> Checking out gh-pages branch...\n"
1514
rm -fr ./gh-pages
1615
git config --global user.email "github-actions[bot]@users.noreply.github.com"
1716
git config --global user.name "github-actions[bot]"
18-
git checkout -b gh-pages origin/gh-pages
17+
# Checkout the gh-pages branch as a copy of latest in main
18+
git checkout -b gh-pages --no-guess
1919
git status
2020
printf "\n>>>>> Finished checking out...\n"
2121

2222
printf "\n>>>>> Generating Javadoc...\n"
2323
mvn -B versions:set -DnewVersion="${GITHUB_TAG}" -DgenerateBackupPoms=false
24+
printf "\n>>>>> [DEBUG] build fodler contents...\n"
25+
ls -la build
26+
printf "\n>>>>> [/DEBUG] build fodler contents...\n"
2427
mvn clean javadoc:aggregate --settings build/.github.settings.xml
2528
printf "\n>>>>> Finished generating Javadoc...\n"
2629

0 commit comments

Comments
 (0)