Skip to content

Commit

Permalink
fix: SDK reference docs alpha version check (#2069)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSchwert authored Aug 6, 2024
1 parent 5ffece5 commit bc8d10e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/scripts/check-docs-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 4 additions & 3 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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 <https://docs.immutable.com|imx-docs site> 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 <https://docs.immutable.com|imx-docs site> to reflect the change.*"

- name: Notify SDK Slack Docs Publish Failure
if: ${{ failure() && steps.docs_version_check.conclusion == 'success' }}
Expand Down

0 comments on commit bc8d10e

Please sign in to comment.