Skip to content

Fix Cloudflare Pages deploy auth in website workflow#4514

Merged
shai-almog merged 1 commit intomasterfrom
codex/fix-ci-process-for-cloudflare-upload
Feb 13, 2026
Merged

Fix Cloudflare Pages deploy auth in website workflow#4514
shai-almog merged 1 commit intomasterfrom
codex/fix-ci-process-for-cloudflare-upload

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • Wrangler was failing in CI because it requires CLOUDFLARE_API_TOKEN to be present in the environment in non-interactive runs, causing pages deploy to error.
  • The workflow needed to expose the token and account id directly to the step and support alternate secret naming used in some repos/orgs.

Description

  • Export CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID in the deploy step env so the wrangler CLI can authenticate in non-interactive CI.
  • Keep apiToken and accountId inputs for cloudflare/wrangler-action@v3 but add fallbacks to CF_API_TOKEN and CF_ACCOUNT_ID secret names for compatibility.
  • Add a fallback CF_PAGES_PROJECT_NAME secret in the --project-name argument to cover alternative secret naming conventions.
  • Preserve the original push-branch condition and deploy command behavior.

Testing

  • Parsed the updated workflow YAML with ruby -e "require 'yaml'; YAML.load_file('.github/workflows/website-docs.yml'); puts 'ok'", which succeeded and printed ok.

Codex Task

@shai-almog shai-almog merged commit 807c35b into master Feb 13, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant