Skip to content

Commit ec4dad7

Browse files
committed
Publish 4.0 gh-pages documentation from release/4.0 branch
1 parent 78cbb92 commit ec4dad7

File tree

2 files changed

+11
-60
lines changed

2 files changed

+11
-60
lines changed

.github/workflows/publish-github-pages.yml renamed to .github/workflows/publish-latest-minor-gh-pages.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: "PublishGitHubPages"
99
on:
1010
push:
1111
branches:
12-
- main
12+
- release/4.0
1313
paths:
1414
- 'documentation/**'
1515
schedule:
@@ -25,12 +25,11 @@ jobs:
2525
runs-on: ubuntu-latest
2626

2727
steps:
28-
- name: Checkout main
28+
- name: Checkout branch
2929
uses: actions/checkout@v3
3030
with:
31-
ref: main
3231
fetch-depth: 32
33-
path: main
32+
path: branch
3433

3534
- name: Checkout gh-pages
3635
uses: actions/checkout@v3
@@ -45,13 +44,17 @@ jobs:
4544
tar -xf hugo.tar.gz
4645
export PATH="$PWD:$PATH"
4746
mkdir $GITHUB_WORKSPACE/WORK
48-
cd $GITHUB_WORKSPACE/main/documentation
49-
./publish.sh -o $GITHUB_WORKSPACE/WORK
47+
cd $GITHUB_WORKSPACE/branch/documentation
48+
echo "Documentation branch is $GITHUB_REF_NAME..."
49+
echo "Building documentation for latest minor version..."
50+
hugo -s site -d "$GITHUB_WORKSPACE/WORK" -b https://oracle.github.io/weblogic-kubernetes-operator
51+
echo "Copying static files into place..."
52+
cp -R charts domains "$GITHUB_WORKSPACE/WORK"
5053
cd $GITHUB_WORKSPACE/gh-pages
51-
rm -Rf *
54+
find . -maxdepth 1 -mindepth 1 -not -name '[0-9]*' -exec rm -Rf {} \;
5255
cp -R $GITHUB_WORKSPACE/WORK/* .
5356
git config --global user.name "github-actions[bot]"
5457
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
5558
git add --all
5659
git commit -m "Documentation update from publish GitHub Action"
57-
git push origin gh-pages
60+
git push origin gh-pages

documentation/publish.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)