@@ -9,7 +9,7 @@ name: "PublishGitHubPages"
9
9
on :
10
10
push :
11
11
branches :
12
- - main
12
+ - release/4.0
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,17 @@ 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
+ 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"
50
53
cd $GITHUB_WORKSPACE/gh-pages
51
- rm -Rf *
54
+ find . -maxdepth 1 -mindepth 1 -not -name '[0-9]*' -exec rm -Rf {} \;
52
55
cp -R $GITHUB_WORKSPACE/WORK/* .
53
56
git config --global user.name "github-actions[bot]"
54
57
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
55
58
git add --all
56
59
git commit -m "Documentation update from publish GitHub Action"
57
- git push origin gh-pages
60
+ git push origin gh-pages
0 commit comments