Quick summary
This tutorial shows how to hide an API key in GitHub by storing it as an encrypted repository secret under Actions settings. Using GitHub Secrets keeps sensitive credentials out of your source code and safely accessible to your CI/CD workflows.
Steps
- Navigate to your desired repository.
- Click on the Settings tab.
- Under Security, select Secrets and variables.
- Select Actions.
- Click New repository secret.
- Add your secret name in the empty field.
- Provide the value of the secret — your actual API key.
- Click Add secret to complete the action.



