Skip to content

Commit 139ca89

Browse files
committed
Restore genration of 4.2 documentation
1 parent ecdc9ec commit 139ca89

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

.github/workflows/publish-gh-pages.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,20 @@ jobs:
2525
runs-on: ubuntu-latest
2626

2727
steps:
28-
- name: Checkout branch
28+
- name: Checkout main branch
2929
uses: actions/checkout@v5
3030
with:
3131
fetch-depth: 32
3232
ref: main
3333
path: branch-main
3434

35+
- name: Checkout 4.2 branch
36+
uses: actions/checkout@v5
37+
with:
38+
fetch-depth: 32
39+
ref: release/4.2
40+
path: branch-4.2
41+
3542
- name: Checkout gh-pages
3643
uses: actions/checkout@v5
3744
with:
@@ -49,17 +56,27 @@ jobs:
4956
cp -R $GITHUB_WORKSPACE/gh-pages/charts $GITHUB_WORKSPACE/WORK
5057
5158
cd $GITHUB_WORKSPACE/branch-main/documentation
52-
echo "Building documentation..."
59+
echo "Building main documentation..."
5360
latest_tag=$(git ls-remote https://github.com/oracle/weblogic-kubernetes-operator.git --h --sort origin "refs/tags/v*" | cut -f2 | grep v4.3 | cut -c12- | sort --version-sort | tail -1)
5461
echo "Latest tag is $latest_tag..."
5562
echo $latest_tag >| $GITHUB_WORKSPACE/branch-main/documentation/site/layouts/shortcodes/latestVersion.html
5663
cat $GITHUB_WORKSPACE/branch-main/documentation/site/layouts/shortcodes/latestVersion.html
5764
hugo -s site -d "$GITHUB_WORKSPACE/WORK" -b https://oracle.github.io/weblogic-kubernetes-operator
65+
66+
cd $GITHUB_WORKSPACE/branch-4.2/documentation
67+
echo "Building 4.2 documentation..."
68+
latest_42_tag=$(git ls-remote https://github.com/oracle/weblogic-kubernetes-operator.git --h --sort origin "refs/tags/v*" | cut -f2 | grep v4.2 | cut -c12- | sort --version-sort | tail -1)
69+
echo "Latest 4.2 tag is $latest_42_tag..."
70+
echo $latest_42_tag >| $GITHUB_WORKSPACE/branch-4.2/documentation/site/layouts/shortcodes/latestVersion.html
71+
cat $GITHUB_WORKSPACE/branch-4.2/documentation/site/layouts/shortcodes/latestVersion.html
72+
hugo -s site -d "$GITHUB_WORKSPACE/WORK/4.2" -b https://oracle.github.io/weblogic-kubernetes-operator/4.2
73+
5874
echo "Copying static files into place..."
5975
cp -R domains "$GITHUB_WORKSPACE/WORK"
6076
6177
cd $GITHUB_WORKSPACE/gh-pages
6278
find . -maxdepth 1 -mindepth 1 -not -name '[0-9]*' -not -name '.git*' -exec rm -Rf {} \;
79+
rm -Rf 4.2
6380
6481
cp -R $GITHUB_WORKSPACE/WORK/* .
6582
git config --global user.name "github-actions[bot]"

documentation/site/content/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ See the [Release Notes](https://github.com/oracle/weblogic-kubernetes-operator/r
4747
As of November 2024, version 3.4.x of the WebLogic Kubernetes Operator is no longer supported.
4848
{{% /notice %}}
4949

50-
Documentation for prior releases of the operator: [3.4](https://oracle.github.io/weblogic-kubernetes-operator/3.4/), [4.0](https://oracle.github.io/weblogic-kubernetes-operator/4.0/), and [4.1](https://oracle.github.io/weblogic-kubernetes-operator/4.1/).
50+
Documentation for prior releases of the operator: [3.4](https://oracle.github.io/weblogic-kubernetes-operator/3.4/), [4.0](https://oracle.github.io/weblogic-kubernetes-operator/4.0/), [4.1](https://oracle.github.io/weblogic-kubernetes-operator/4.1/), and [4.2](https://oracle.github.io/weblogic-kubernetes-operator/4.2/).
5151

5252
#### Backward compatibility guidelines
5353

0 commit comments

Comments
 (0)