1
- # Copyright (c) 2021, 2024 , Oracle and/or its affiliates.
1
+ # Copyright (c) 2021, 2025 , Oracle and/or its affiliates.
2
2
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3
3
#
4
4
# Description
@@ -9,6 +9,11 @@ name: "PublishGitHubPages"
9
9
on :
10
10
schedule :
11
11
- cron : ' 15 3 * * *'
12
+ push :
13
+ branches :
14
+ - main
15
+ paths :
16
+ - ' documentation/**'
12
17
13
18
defaults :
14
19
run :
24
29
uses : actions/checkout@v5
25
30
with :
26
31
fetch-depth : 32
27
- ref : release/4.2
28
- path : branch-4.2
32
+ ref : main
33
+ path : branch-main
29
34
30
35
- name : Checkout gh-pages
31
36
uses : actions/checkout@v5
@@ -43,12 +48,12 @@ jobs:
43
48
44
49
cp -R $GITHUB_WORKSPACE/gh-pages/charts $GITHUB_WORKSPACE/WORK
45
50
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
52
57
hugo -s site -d "$GITHUB_WORKSPACE/WORK" -b https://oracle.github.io/weblogic-kubernetes-operator
53
58
echo "Copying static files into place..."
54
59
cp -R domains "$GITHUB_WORKSPACE/WORK"
0 commit comments