PREVIEW defaults to false on pull requests
alexflint opened this issue ยท 2 comments
alexflint commented
๐ Describe the bug
In the docs you say that the default value for PRODUCTION is "true (false for PR deployments)", but when I use this action from a pull request, it creates a production deployment on vercel.
๐ To Reproduce
Create a pull request on a repository with an ordinary github action like this:
name: Vercel Preview Deployment
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Check out the code
- name: Checkout
uses: actions/checkout@v4
# Deploy on vercel
- name: Deploy to Vercel
uses: BetaHuhn/deploy-to-vercel-action@v1
๐ก Expected behavior
Creates a preview deployment
๐ผ๏ธ Screenshots
N/A
โ๏ธ Environment
I am using BetaHuhn/deploy-to-vercel-action@v1
๐ Additional context
N/A
pm0u commented
i think you want on: pull_request
https://github.com/BetaHuhn/deploy-to-vercel-action/blob/master/src/config.js#L6
or
with:
PRODUCTION: false
alexflint commented
Oh, I see. It's based on the trigger rather than the branch name. Makes sense.