From bc8d10e0883942f7eb558737e35b93c0d0705279 Mon Sep 17 00:00:00 2001 From: Nik <2661899+CodeSchwert@users.noreply.github.com> Date: Tue, 6 Aug 2024 18:02:55 +1200 Subject: [PATCH] fix: SDK reference docs alpha version check (#2069) --- .github/scripts/check-docs-version.sh | 6 ++++++ .github/workflows/publish-docs.yaml | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/scripts/check-docs-version.sh b/.github/scripts/check-docs-version.sh index c2b8586824..eb575cb018 100755 --- a/.github/scripts/check-docs-version.sh +++ b/.github/scripts/check-docs-version.sh @@ -20,3 +20,9 @@ if [ -d "$CLONE_DIR/api-docs/sdk-references/ts-immutable-sdk/$VERSION" ]; then echo "There is already a docs folder for v$VERSION. Please create a separate PR to update the SDK reference docs for v$VERSION." exit 1 fi + +# check the version contains `alpha` string +if echo "$VERSION" | grep -q "alpha"; then + echo "Skipping docs generation for alpha version" + exit 1 +fi diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml index a498bea6e1..81a860f37a 100644 --- a/.github/workflows/publish-docs.yaml +++ b/.github/workflows/publish-docs.yaml @@ -26,11 +26,11 @@ jobs: VERSION=$(git describe --tags --abbrev=0) if echo "$VERSION" | grep -q "alpha"; then echo "Skipping docs generation for alpha version" - echo "is_alpha=true" >> $GITHUB_ENV + echo "is_alpha=true" >> $GITHUB_OUTPUT exit 0 else echo "Generating docs for non-alpha version" - echo "is_alpha=false" >> $GITHUB_ENV + echo "is_alpha=false" >> $GITHUB_OUTPUT fi shell: bash @@ -47,6 +47,7 @@ jobs: steps: - name: Is Alpha Version run: | + echo "Is Alpha Version: ${{ needs.AlphaCheck.outputs.is_alpha }}" echo "Is Alpha Version: ${{ env.IS_ALPHA }}" - name: Check Public Release Branch @@ -135,7 +136,7 @@ jobs: if: ${{ success() && steps.docs_push.conclusion == 'success' && steps.netlify_build.conclusion == 'success' && steps.netlify_deploy.conclusion == 'success' }} uses: ./.github/actions/notify-slack-publish-status with: - message: "✅ SDK reference documents published successfully - https://docs.immutable.com/sdk-references/ts-immutable-sdk/${{ env.VERSION }}/modules/_imtbl_sdk.html\n\n>*`${{ env.GITHUB_USER }}` Please ensure you and the team updated all Sample Code + Guides on the to reflect the change.*" + message: "✅ SDK reference documents published successfully - https://docs.immutable.com/sdk-references/ts-immutable-sdk/${{ env.VERSION }}/\n\n>*`${{ env.GITHUB_USER }}` Please ensure you and the team updated all Sample Code + Guides on the to reflect the change.*" - name: Notify SDK Slack Docs Publish Failure if: ${{ failure() && steps.docs_version_check.conclusion == 'success' }}