Application Stack
Environment variables
Keep application configuration outside the repository and decide whether each value applies to production, previews, or both.
Add a variable
- Open the production application and select Settings.
- Under Environment variables, add a name and value.
- Choose Production & preview, Production only, or Preview only.
- Turn on Secret for passwords, tokens, and private keys.
- Save the variables, then redeploy to use the new values.
Build and runtime behavior
Before a GitHub build, the workflow requests the values for that environment and writes them to a temporary dotenv file. If no values exist or the download is unavailable, the build continues without creating an empty file. Values intended for a static application are compiled into its output according to that framework's rules.
Secret handling
- Values are encrypted before storage.
- Secret values are masked after saving and cannot be read back in the console.
- Leaving an existing secret blank keeps its saved value.
- Names may contain letters, numbers, and underscores, but cannot begin with a number.
- PORT and HOST are reserved platform names and cannot be used for application settings.
Only expose browser-safe values through framework conventions such as VITE_ or NEXT_PUBLIC_. Keep credentials server-side.
Fix it yourself. The link below opens this file in GitHub's editor and forks the repository for you if you need one, and your change becomes a pull request without leaving the browser.