From d4b5a6d3eecaefaf8b1755c302ac8b69f7e57988 Mon Sep 17 00:00:00 2001 From: Wes Dean Date: Tue, 19 Nov 2024 08:25:56 -0500 Subject: [PATCH] Remove a static delay, delete comment while waiting for render --- .github/workflows/preview_button.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preview_button.yml b/.github/workflows/preview_button.yml index fb115510..8ae803af 100644 --- a/.github/workflows/preview_button.yml +++ b/.github/workflows/preview_button.yml @@ -6,6 +6,7 @@ on: pull_request: workflow_dispatch: + permissions: read-all concurrency: @@ -48,8 +49,11 @@ jobs: fi ) >> "$GITHUB_OUTPUT" - - name: Delay while the preview URL is built - run: "sleep ${{ steps.customvars.outputs.DELAY_SECONDS }}" + - name: Delete a comment + uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # pin@v3 + with: + comment-tag: button + mode: delete - name: Wait for site to render run: curl --retry-delay 10 --retry 18 --retry-all-errors -f -X HEAD -s -o /dev/null "${{ steps.customvars.outputs.BASE_URL }}${{ steps.customvars.outputs.URL_PATH }}"