diff --git a/.github/workflows/publish-main.yml b/.github/workflows/publish-main.yml index 3514dad8..a0148fca 100644 --- a/.github/workflows/publish-main.yml +++ b/.github/workflows/publish-main.yml @@ -42,11 +42,7 @@ jobs: - name: set release name run: | echo "release tag: $TAG" -# if [[ $TAG == mp-* ]]; then export RELEASE="$(echo $TAG | sed -r 's/^.{3}//')" -# else -# export RELEASE="$TAG" -# fi echo "VERSION=$RELEASE" >> "$GITHUB_ENV" - name: Build docs @@ -63,7 +59,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