From 9c8fbc774ffcba67b517649795eba9bc4a99a4f0 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 10 Jan 2025 13:56:24 +0300 Subject: [PATCH] ci/docs-preview: double check preview directory deletion --- .github/workflows/docs-preview.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index dc5f6543..c38be9da 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -164,6 +164,19 @@ jobs: needs: cleanup runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Double check preview directory deletion + run: | + # Check if the preview directory exists, and delete it if it does + if [ -d "docs-preview-${{ github.event.pull_request.number }}" ]; then + echo "Something went wrong, preview directory is not deleted." + exit 1 + else + echo "Preview directory has been deleted successfully, proceeding." + fi + - name: Post cleanup verification uses: peter-evans/create-or-update-comment@v4 with: