Issue uploading secrets from Github Action when specifying environment
After specifying the environment for wrangler deploy in a Github Action, I get an error during the secrets upload stage.
I've attached screenshots of my toml config and github action yml.
This setup works if I do not specify the deploy environment for wrangler.
Thank you for your consideration.
2 Replies
This is a related issue: https://github.com/cloudflare/wrangler-action/issues/162
GitHub
Action fails on first deployment if secrets are used · Issue #162 ·...
We currently upload secrets before deploying the script, but this understandably will fail if the script has never been deployed yet. We should think about how to prevent this, e.g. "touch&quo...
The fix is to specify the environment like this
environment: preview