# Github Actions How to Use Environment Variables

> To use environment variables in GitHub, navigate to your repository settings, select Environments, and click New environment. Name the environment and click Configure environment. Optionally add deployment branches and tags, then click Add environment secret or Add environment variables to manage configuration and data within your workflows.

Canonical: https://livedemo.ai/tutorials/github-actions-how-to-use-environment-variables/
Apps: GitHub
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/6929ffef243f01ed60a4d6c3/preview?step=1

## Steps

1. Navigate to your desired repository and click on the 'Settings' button.
2. Select 'Environments'.
3. Click 'New environment'.
4. Name your environment and click 'Configure environment'.
5. You can add deployment to branches and tags.
6. To add an environment secret, click the 'Add environment secret' button.
7. Click 'Add environment variables' which can be used to manage configuration and data within your workflows.
