From 9f8ef9972f66a71186e96b3b4749c87f55ccba92 Mon Sep 17 00:00:00 2001 From: Jonah Lawrence Date: Sun, 23 Oct 2022 10:02:02 -0600 Subject: [PATCH] ci: Update vercel action to deploy pull requests (#80) --- .github/workflows/vercel-deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vercel-deploy.yml b/.github/workflows/vercel-deploy.yml index baec3cf..b8b937d 100644 --- a/.github/workflows/vercel-deploy.yml +++ b/.github/workflows/vercel-deploy.yml @@ -4,6 +4,7 @@ on: push: branches: - main + pull_request: workflow_dispatch: jobs: @@ -19,4 +20,5 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} - vercel-args: --prod + # use --prod if it is a push to main, otherwise it is a preview + vercel-args: ${{ github.event_name != 'pull_request' && '--prod' || '' }}