6
6
order : 2
7
7
---
8
8
9
- import { DirectoryListing } from " ~/components" ;
9
+ import { DirectoryListing , Render , Tabs , TabItem } from " ~/components" ;
10
10
11
11
When connecting your Git repository to your Worker, you can customize the configurations needed to build and deploy your Worker.
12
12
@@ -82,12 +82,26 @@ It is recommended to consistently use the same API token across all uploads and
82
82
83
83
## Environment variables
84
84
85
- You can provide custom environment variables to your build by configuring them in the Cloudflare dashboard:
85
+ You can provide custom environment variables to your build.
86
86
87
- 1 . Log in to the [ Cloudflare dashboard] ( https://dash.cloudflare.com ) and select your account.
88
- 2 . In ** Account Home** , select ** Workers & Pages** .
89
- 3 . In ** Overview** , select your Worker.
90
- 4 . Select ** Settings** > ** Environment variables** .
87
+ <Tabs >
88
+ <TabItem label = " Dashboard" >
89
+
90
+ To add environment variables via the dashboard:
91
+
92
+ 1 . Log in to the [ Cloudflare dashboard] ( https://dash.cloudflare.com ) and select your account.
93
+ 2 . In ** Account Home** , select ** Workers & Pages** .
94
+ 3 . In ** Overview** , select your Worker.
95
+ 4 . Select ** Settings** > ** Environment variables** .
96
+ </TabItem >
97
+ <TabItem label = " Wrangler" >
98
+ To add env variables using Wrangler, define text and JSON via the ` [vars] ` configuration in your Wrangler file.
99
+
100
+ <Render file = " envvar-example" />
101
+ </TabItem >
102
+ </Tabs >
103
+
104
+ ### Default variables
91
105
92
106
The following system environment variables are injected by default (but can be overridden):
93
107
@@ -97,4 +111,4 @@ The following system environment variables are injected by default (but can be o
97
111
| ` WORKERS_CI ` | ` 1 ` | Changing build behaviour when run on Workers Builds versus locally |
98
112
| ` WORKERS_CI_BUILD_UUID ` | ` <build-uuid-of-current-build> ` | Passing the Build UUID along to custom workflows |
99
113
| ` WORKERS_CI_COMMIT_SHA ` | ` <sha1-hash-of-current-commit> ` | Passing current commit ID to error reporting, for example, Sentry |
100
- | ` WORKERS_CI_BRANCH ` | ` <branch-name-from-push-event ` | Customizing build based on branch, for example, disabling debug logging on ` production ` |
114
+ | ` WORKERS_CI_BRANCH ` | ` <branch-name-from-push-event ` | Customizing build based on branch, for example, disabling debug logging on ` production ` |
0 commit comments