## TL;DR

deployctl not reading env secrets in GitHub Actions: in Deno Deploy project settings, change the git integration from 'Automatic' to 'GitHub Action'. That creates a 'Production' environment on your repo; create the DENO_DEPLOY_TOKEN secret in that environment.

## Steps

1. deployctl not reading env secrets in GitHub Actions: in Deno Deploy project settings, change the git integration from 'Automatic' to 'GitHub Action'. That creates a 'Production' environment on your repo; create the DENO_DEPLOY_TOKEN secret in that environment. Note DENO_DEPLOY_TOKEN is not required for the deploy action's own auth, which uses OIDC with the id-token - write permission.

2. _Source: https://github.com/denoland/deployctl/issues/298 (Deno Deploy)_

## When to use

You are seeing this: That creates a 'Production' environment on your repo; create the DENO_DEPLOY_TOKEN secret in that environment. Use this skill when you run into "deployctl is not able to read env secret in GitHub Action".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Edge cases

- Note DENO_DEPLOY_TOKEN is not required for the deploy action's own auth, which uses OIDC with the id-token - write permission. _Source: https://github.com/denoland/deployctl/issues/298 (Deno Deploy)_

## Sources

- https://github.com/denoland/deployctl/issues/298
