Skip to content

Instantly share code, notes, and snippets.

@o-az
Last active July 13, 2022 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save o-az/6fb352e9b960bf2654ed6e9d97ba3a3a to your computer and use it in GitHub Desktop.
Save o-az/6fb352e9b960bf2654ed6e9d97ba3a3a to your computer and use it in GitHub Desktop.
deploy .env environment variables to vercel from CLI
#!/bin/sh -
# USAGE: sh vercel-deploy-env.sh <filename> <environment>
# EXAMPLE: sh vercel-deploy-env.sh .env production
while IFS== read -r name value
do
echo "$value" | vercel env add "$name" "$2"
done < "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment