From de750c216160c589ce84bd7bdc262d887db878c5 Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 8 Dec 2023 12:55:54 -0500 Subject: [PATCH] Update error messages --- .github/workflows/tugboat-pr-closed.yml | 9 ++++----- .github/workflows/tugboat-pr-updated.yml | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tugboat-pr-closed.yml b/.github/workflows/tugboat-pr-closed.yml index 80cf8869d..a5749ffa0 100644 --- a/.github/workflows/tugboat-pr-closed.yml +++ b/.github/workflows/tugboat-pr-closed.yml @@ -34,14 +34,13 @@ jobs: - name: Set Preview ID if: ${{ steps.docs-only.outputs.docs-only == 'false' }} run: | - PREVIEW_ID=$(cat .tugboat_preview.txt) - if [ -z "$PREVIEW_ID" ]; then + if [ -f "$PREVIEW_ID" ]; then echo "Preview ID not found, please manually delete Tugboat Preview." exit 1 - else - echo $PREVIEW_ID - echo "PREVIEW_ID=$PREVIEW_ID" >> $GITHUB_ENV fi + PREVIEW_ID=$(cat .tugboat_preview.txt) + echo "Preview ID: ${PREVIEW_ID}" + echo "PREVIEW_ID=$PREVIEW_ID" >> $GITHUB_ENV - name: Cleanup temporary file if: ${{ steps.docs-only.outputs.docs-only == 'false' }} run: rm .tugboat_preview.txt diff --git a/.github/workflows/tugboat-pr-updated.yml b/.github/workflows/tugboat-pr-updated.yml index a825a110b..02975305e 100644 --- a/.github/workflows/tugboat-pr-updated.yml +++ b/.github/workflows/tugboat-pr-updated.yml @@ -34,14 +34,13 @@ jobs: - name: Set Preview ID if: ${{ steps.docs-only.outputs.docs-only == 'false' }} run: | - PREVIEW_ID=$(cat .tugboat_preview.txt) - if [ -z "$PREVIEW_ID" ]; then + if [ -f "$PREVIEW_ID" ]; then echo "Preview ID not found, please manually rebuild Tugboat Preview." exit 1 - else - echo $PREVIEW_ID - echo "PREVIEW_ID=$PREVIEW_ID" >> $GITHUB_ENV fi + PREVIEW_ID=$(cat .tugboat_preview.txt) + echo "Preview ID: ${PREVIEW_ID}" + echo "PREVIEW_ID=$PREVIEW_ID" >> $GITHUB_ENV - name: Cleanup temporary file if: ${{ steps.docs-only.outputs.docs-only == 'false' }} run: rm .tugboat_preview.txt