diff --git a/.github/scripts/generate-latest-doc.sh b/.github/scripts/generate-latest-doc.sh new file mode 100755 index 0000000000..7a4217e5a2 --- /dev/null +++ b/.github/scripts/generate-latest-doc.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Keptn Lifecycle Toolkit Documentation generation +# +# This script supports the release of the latest version of the documentation +# The final files are available under the docs/release folder + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +ROOT_DIR=${SCRIPT_DIR/.github\/scripts/} +DOC_DIR="${ROOT_DIR}docs" +WORK_DIR=${DOC_DIR}/release + +## Create the working folder +mkdir -p $WORK_DIR + +cd $WORK_DIR + +## Download the latest status of the main documentation +git clone https://github.com/keptn/lifecycle-toolkit.git +cd lifecycle-toolkit +git checkout page +git pull + +## Rewrite with the current content +cp -r "${DOC_DIR}/content/en/docs" ./docs/content/en + diff --git a/.gitignore b/.gitignore index 358d7e46f2..1f6b1f65c2 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ manifests/ ## Kubebuilder **/kubebuilder /docs/tmp/ +/docs/release/ /docs/.hugo_build.lock /docs/resources/_gen /docs/public