From cb4b276ec3f8d7451d6c030e53ff668f5c1a91c3 Mon Sep 17 00:00:00 2001 From: Taesung Hwang Date: Fri, 1 Nov 2024 01:33:01 -0700 Subject: [PATCH] Run Sanity deploy preview only when PR is labeled - Run workflow step only if the pull request is labeled with 'sanity' --- .github/workflows/deploy-preview.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index b3c9c20f..7dc325b4 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -2,6 +2,8 @@ name: Deploy Preview on: pull_request: + branches: + main permissions: contents: read @@ -36,6 +38,7 @@ jobs: vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_SITE}} Studio: runs-on: ubuntu-latest + if: contains(github.event.pull_request.labels.*.name, 'sanity') steps: - uses: actions/checkout@v2 - uses: amondnet/vercel-action@v25