From a2e49e4ff9f1ce532bbfec427a7c809989c9ae5c Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Wed, 24 Jan 2024 10:52:23 -0500 Subject: [PATCH] Only deploy if not marked as draft. --- .github/workflows/build-deploy.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 56e00cb3..9c475474 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -49,8 +49,15 @@ jobs: # sleep 10 # yarn test-bslocal -e default,firefox,edge,safari -o reports + - name: Check for draft flag + uses: sergeysova/jq-action@v2 + id: draft + with: + cmd: cat package.json | jq -r '.draft // false' + - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4 + if: ${{ steps.draft.outputs.value }} == 'true' with: branch: gh-pages folder: dist