From eb0cb92b9b9df4365535648d8999216c322a0094 Mon Sep 17 00:00:00 2001 From: Katrina Prosise Date: Thu, 23 Apr 2026 06:50:53 -0400 Subject: [PATCH] Add check for latest tag Compares tag that triggered build with tag of latest commit. If they are the same, docs are built and added as latest. Signed-off-by: Katrina Prosise --- .github/workflows/publish-main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-main.yml b/.github/workflows/publish-main.yml index 3514dad8..247dc368 100644 --- a/.github/workflows/publish-main.yml +++ b/.github/workflows/publish-main.yml @@ -63,7 +63,8 @@ jobs: mv offline-docs.tgz $VERSION/ echo $BUCKET_CREDS > secret echo -e "secret\nY\nosf-prod\nN\n" | gsutil config -e - gsutil -m rsync -d -r dev gs://docs.foundries.io/$VERSION -# if [[ $TAG == mp-* ]]; then + gsutil -m rsync -d -r $VERSION gs://docs.foundries.io/$VERSION + export LATEST_TAG="$(git tag --sort=-committerdate | head -n 1)" + if [[ $TAG == $LATEST_TAG ]]; then gsutil -m rsync -d -r gs://docs.foundries.io/${VERSION} gs://docs.foundries.io/latest fi