diff --git a/.github/workflows/retype-action.yml b/.github/workflows/retype-action.yml index f85a1258..99492939 100644 --- a/.github/workflows/retype-action.yml +++ b/.github/workflows/retype-action.yml @@ -25,6 +25,29 @@ jobs: with: config_path: ./docs/retype.yml + - uses: 1arp/create-a-file-action@0.4.5 + with: + path: '.' + isAbsolutePath: false + file: 'script.sh' + content: | + #!/bin/bash + + # https://vercel.com/guides/how-do-i-use-the-ignored-build-step-field-on-vercel + + echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF" + + if [[ "$VERCEL_GIT_COMMIT_REF" == "main" || "$VERCEL_GIT_COMMIT_REF" == "cms" || "$VERCEL_GIT_COMMIT_REF" == "feat/cms" ]] ; then + # Proceed with the build + echo "✅ - Build can proceed" + exit 1; + + else + # Don't build + echo "🛑 - Build cancelled" + exit 0; + fi + - uses: retypeapp/action-github-pages@latest with: update-branch: true diff --git a/docs/script.sh b/docs/script.sh deleted file mode 100644 index cd5d74f0..00000000 --- a/docs/script.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# https://vercel.com/guides/how-do-i-use-the-ignored-build-step-field-on-vercel - -echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF" - -if [[ "$VERCEL_GIT_COMMIT_REF" == "main" || "$VERCEL_GIT_COMMIT_REF" == "cms" || "$VERCEL_GIT_COMMIT_REF" == "feat/cms" ]] ; then - # Proceed with the build - echo "✅ - Build can proceed" - exit 1; - -else - # Don't build - echo "🛑 - Build cancelled" - exit 0; -fi \ No newline at end of file