astro deployment variable update
This command is only available on Astro.
For a given Deployment on Astro, use astro deployment variable update
to update the value of an existing environment variable with the Astro CLI. To do so, you can either:
- Manually enter a new
key=value
pair for an existing key directly in the command. - Modify the value of one or more environment variables in a
.env
file and load that file with--load
.
This command is functionally identical to editing and saving the value of an existing environment variable in the Astro UI. For more information on environment variables, see Set environment variables on Astro.
Usage
This command is recommended for automated workflows. To run this command in an automated process such as a CI/CD pipeline, you can generate an API token, then specify the ASTRO_API_TOKEN
environment variable in the system running the Astro CLI:
See Organization, Workspace, and Deployment API token documentation for more details about ways to use API tokens.