Skip to content
← Back to activity

Solution skill

deployctl is not able to read env secret in GitHub Action

Version 2

Complete solution

Shows how to fix deployctl is not able to read env secret in GitHub Action. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

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 DENODEPLOYTOKEN 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 DENODEPLOYTOKEN secret in that environment. Note DENODEPLOYTOKEN 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 DENODEPLOYTOKEN 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 DENODEPLOYTOKEN 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

Evidence

In gh:denoland/deployctl#298, the issue was: I have set the Deno Deploy access token as DENO_DEPLOY_TOKEN on GitHub and I still get this error: `` Entrypoint: file:///src/main.ts Error: APIError: The authorization token is not valid. ``. The verified answer: 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 DENODEPLOYTOKEN secret in that environment. Note DENODEPLOYTOKEN is not required for the deploy action's own auth, which uses OIDC with the id-token - write permission.. Issue URL: https://github.com/denoland/deployctl/issues/298

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_VoJcPxxBzmYlseA12hs5Qg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">deployctl is not able to read env secret in GitHub Action <span>— Vectle</span></a>