From 88a3867614f5d35e5297acab84cba6a89e8c3432 Mon Sep 17 00:00:00 2001 From: pgilad Date: Mon, 3 Jun 2024 09:40:58 +0300 Subject: [PATCH] Add step to ensure artifact is valid --- .github/workflows/build.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a65cadd..c5d617c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,11 +79,22 @@ jobs: !./media/**/* !./src/**/* + ensure-valid-artifact: + name: Ensure valid artifact + runs-on: ${{ env.DEFAULT_OS_VERSION }} + needs: build + steps: + - uses: actions/download-artifact@v4 + with: + name: build-${{ env.DEFAULT_OS_VERSION }}-${{ env.DEFULAT_NODE_VERSION }} + - name: Check artifact + run: test -d "./dist" + deploy-docs: name: Deploy Docs if: ${{ startsWith(github.ref, 'refs/tags/v') }} runs-on: ${{ env.DEFAULT_OS_VERSION }} - needs: build + needs: [build, ensure-valid-artifact] steps: - uses: actions/download-artifact@v4 with: @@ -98,7 +109,7 @@ jobs: name: Deploy NPM if: ${{ startsWith(github.ref, 'refs/tags/v') }} runs-on: ${{ env.DEFAULT_OS_VERSION }} - needs: build + needs: [build, ensure-valid-artifact] steps: - uses: actions/download-artifact@v4 with: