1- # Copyright (c) 2021, 2024 , Oracle and/or its affiliates.
1+ # Copyright (c) 2021, 2025 , Oracle and/or its affiliates.
22# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33#
44# Description
@@ -9,6 +9,11 @@ name: "PublishGitHubPages"
99on :
1010 schedule :
1111 - cron : ' 15 3 * * *'
12+ push :
13+ branches :
14+ - main
15+ paths :
16+ - ' documentation/**'
1217
1318defaults :
1419 run :
2429 uses : actions/checkout@v5
2530 with :
2631 fetch-depth : 32
27- ref : release/4.2
28- path : branch-4.2
32+ ref : main
33+ path : branch-main
2934
3035 - name : Checkout gh-pages
3136 uses : actions/checkout@v5
@@ -43,12 +48,12 @@ jobs:
4348
4449 cp -R $GITHUB_WORKSPACE/gh-pages/charts $GITHUB_WORKSPACE/WORK
4550
46- cd $GITHUB_WORKSPACE/branch-4.2 /documentation
47- echo "Building documentation for 4.2 minor version ..."
48- 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)
49- echo "Latest tag is $latest_42_tag ..."
50- echo $latest_42_tag >| $GITHUB_WORKSPACE/branch-4.2 /documentation/site/layouts/shortcodes/latestVersion.html
51- cat $GITHUB_WORKSPACE/branch-4.2 /documentation/site/layouts/shortcodes/latestVersion.html
51+ cd $GITHUB_WORKSPACE/branch-main /documentation
52+ echo "Building documentation..."
53+ 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)
54+ echo "Latest tag is $latest_tag ..."
55+ echo $latest_tag >| $GITHUB_WORKSPACE/branch-main /documentation/site/layouts/shortcodes/latestVersion.html
56+ cat $GITHUB_WORKSPACE/branch-main /documentation/site/layouts/shortcodes/latestVersion.html
5257 hugo -s site -d "$GITHUB_WORKSPACE/WORK" -b https://oracle.github.io/weblogic-kubernetes-operator
5358 echo "Copying static files into place..."
5459 cp -R domains "$GITHUB_WORKSPACE/WORK"
0 commit comments