Skip to content

Commit

Permalink
Merge branch 'gh-pages-from-release34' into 'release/3.4'
Browse files Browse the repository at this point in the history
Publish 3.4 gh-pages documentation from release/3.4 branch

See merge request weblogic-cloud/weblogic-kubernetes-operator!4275
  • Loading branch information
rjeberhard committed Jun 8, 2023
2 parents 3e3df29 + 9bd0d06 commit 09e06a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: "PublishGitHubPages"
on:
push:
branches:
- main
- release/3.4
paths:
- 'documentation/**'
schedule:
Expand All @@ -25,12 +25,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout main
- name: Checkout branch
uses: actions/checkout@v3
with:
ref: main
fetch-depth: 32
path: main
path: branch

- name: Checkout gh-pages
uses: actions/checkout@v3
Expand All @@ -45,13 +44,16 @@ jobs:
tar -xf hugo.tar.gz
export PATH="$PWD:$PATH"
mkdir $GITHUB_WORKSPACE/WORK
cd $GITHUB_WORKSPACE/main/documentation
./publish.sh -o $GITHUB_WORKSPACE/WORK
cd $GITHUB_WORKSPACE/branch/documentation
echo "Documentation branch is $GITHUB_REF_NAME..."
minor_version=${GITHUB_REF_NAME#"release/"}
echo "Building documentation for older minor version..."
hugo -s site -d "$GITHUB_WORKSPACE/WORK/$minor_version" -b https://oracle.github.io/weblogic-kubernetes-operator/$minor_version
cd $GITHUB_WORKSPACE/gh-pages
rm -Rf *
rm -Rf $minor_version
cp -R $GITHUB_WORKSPACE/WORK/* .
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add --all
git commit -m "Documentation update from publish GitHub Action"
git push origin gh-pages
git push origin gh-pages
49 changes: 0 additions & 49 deletions documentation/publish.sh

This file was deleted.

0 comments on commit 09e06a3

Please sign in to comment.