Setting multiple environment variables in vercel build step

933 views Asked by At

I am setting a couple of env variables on build time when deploying on vercel using "amondnet/[email protected]+3" github action.

Everything works fine when I set just one variable, but when I set multiple variables as described in Vercel's documenation here: https://vercel.com/docs/cli#commands/overview/unique-options/build-env, I get the following error when running the action:

Error! The specified file or directory "PR_NUMBER=423]" does not exist.

The command the action is trying to run is as follows:

/usr/local/bin/npx vercel --build-env [NODE_ENV=pr PR_NUMBER=423] -t *** -m

1

There are 1 answers

0
paulogdm On BEST ANSWER

It should be:

/usr/local/bin/npx vercel --build-env NODE_ENV=pr --build-env PR_NUMBER=423 -b KEY=value