File tree Expand file tree Collapse file tree 2 files changed +10
-57
lines changed Expand file tree Collapse file tree 2 files changed +10
-57
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ name: "PublishGitHubPages"
9
9
on :
10
10
push :
11
11
branches :
12
- - main
12
+ - release/3.4
13
13
paths :
14
14
- ' documentation/**'
15
15
schedule :
@@ -25,12 +25,11 @@ jobs:
25
25
runs-on : ubuntu-latest
26
26
27
27
steps :
28
- - name : Checkout main
28
+ - name : Checkout branch
29
29
uses : actions/checkout@v3
30
30
with :
31
- ref : main
32
31
fetch-depth : 32
33
- path : main
32
+ path : branch
34
33
35
34
- name : Checkout gh-pages
36
35
uses : actions/checkout@v3
@@ -45,13 +44,16 @@ jobs:
45
44
tar -xf hugo.tar.gz
46
45
export PATH="$PWD:$PATH"
47
46
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
+ minor_version=${GITHUB_REF_NAME#"release/"}
50
+ echo "Building documentation for older minor version..."
51
+ hugo -s site -d "$GITHUB_WORKSPACE/WORK/$minor_version" -b https://oracle.github.io/weblogic-kubernetes-operator/$minor_version
50
52
cd $GITHUB_WORKSPACE/gh-pages
51
- rm -Rf *
53
+ rm -Rf $minor_version
52
54
cp -R $GITHUB_WORKSPACE/WORK/* .
53
55
git config --global user.name "github-actions[bot]"
54
56
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
55
57
git add --all
56
58
git commit -m "Documentation update from publish GitHub Action"
57
- git push origin gh-pages
59
+ git push origin gh-pages
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments