File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 11# deploy-env
2- A CLI tool for deploying environment variables from an ` .env-cmdrc.json ` file to Vercel
2+ Deploy environment variables from ` .env ` and ` .env-cmdrc.json ` files to Vercel
33
44## Installation
55``` bash
@@ -10,30 +10,35 @@ npm add -g deploy-env
1010## Usage
1111In your Vercel project directory:
1212
13- Make an ` .env-cmdrc.json ` file with the following format:
13+ Make at least one ` .env.production ` , ` .env.preview ` , or ` .env.development ` file with your environment variables in the following format:
14+ ``` env
15+ API_KEY=top_secret_api_key
16+ ...
17+ ```
18+
19+ You can also make an ` .env-cmdrc.json ` file with the following format:
1420``` jsonc
1521{
1622 " development" : {
1723 " API_KEY" : " development value"
18- // development environment variables here
24+ // development environment variables
1925 },
2026 " preview" : {
2127 " API_KEY" : " preview value"
22- // preview environment variables here
28+ // preview environment variables
2329 },
2430 " production" : {
2531 " API_KEY" : " production value"
26- // production environment variables here
32+ // production environment variables
2733 }
2834}
2935```
30- > Note: The ` dotenv ` files: ` .env.production ` , ` .env.preview ` , and ` .env.development ` are also supported
3136
3237Run the command:
3338``` bash
3439deploy-env [production| preview| development] [ENV_VAR]...
3540```
36- > You can also use ` dpl-env ` as an alias for ` deploy-env `
41+ > Note: You can use ` dpl-env ` as an alias for ` deploy-env `
3742
3843## Examples
3944Deploy all ` preview ` environment variables to the Preview deployment
You can’t perform that action at this time.
0 commit comments