3 ms·
The docs here [0] do a decent job explaining it. You create an environment, restrict it to the main branch, add your secret to it and then tie your deploy work
by carderne 2y ago
The docs here [0] do a decent job explaining it.
You create an environment, restrict it to the main branch, add your secret to it and then tie your deploy workflow to it.
If someone runs that workflow against another branch it will run but it won’t be able to access those secrets.
[0] https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment https://docs.github.com/en/actions/managing-workflow-runs-an...
- kelseydh 2y agoThank you, very helpful!