Skip to content

fix(cloudflare): migrate wrangler.toml to Workers + Assets format#248

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/cloudflare-workers-build
Jun 24, 2026
Merged

fix(cloudflare): migrate wrangler.toml to Workers + Assets format#248
hyperpolymath merged 1 commit into
mainfrom
fix/cloudflare-workers-build

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Problem

The "Workers Builds: boj-server" check has been failing because:

  1. pages_build_output_dir is not recognised by the post-Pages-merger Cloudflare Workers build system. It interprets the project as a Workers script deployment and looks for a JS entry point.
  2. No [build] command="" — the Git Integration attempts to install every runtime listed in .tool-versions (Zig 0.15.1, Elixir 1.18.4, Idris2 0.8.0, Deno 2.7.14) before a build step that doesn't exist, then fails.

(The pages-deploy.yml GitHub Actions fallback was written to work around exactly this problem, but the Cloudflare Git Integration check itself kept showing red.)

Fix

  • wrangler.toml: replace deprecated pages_build_output_dir = "site" with the current Workers static-assets syntax:
    [assets]
    directory = "site"
    
    [build]
    command = ""
  • .github/workflows/pages-deploy.yml: update fallback deploy from deprecated wrangler pages deploy to wrangler deploy, consistent with the new Workers format.

Test plan

  • Cloudflare Git Integration build succeeds (no .tool-versions install attempt, no missing-entry-point error)
  • pages-deploy.yml GitHub Actions fallback still deploys site/ correctly on push to main
  • site/ content and _headers/_redirects are unaffected

🤖 Generated with Claude Code

https://claude.ai/code/session_01F8pqMfJViUaKabWKNQ9wUg


Generated by Claude Code

…ntegration build

The Cloudflare Git Integration ('Workers Builds: boj-server') was failing
because:
1. `pages_build_output_dir` is not recognised by the post-Pages-merger
   Workers build system — it treats the project as a Workers script
   deployment and expects a JS entry point.
2. With no explicit `[build] command=""`, the Git Integration attempts to
   install every runtime listed in `.tool-versions` (Zig, Elixir, Idris2,
   Deno) before running a build that doesn't exist, and fails.

Fixes:
- Replace `pages_build_output_dir = "site"` with `[assets] directory =
  "site"` — the current Workers static-asset syntax.
- Add `[build] command = ""` — tells the Git Integration there is no build
  step, suppressing .tool-versions installation.
- Update pages-deploy.yml fallback from deprecated `wrangler pages deploy`
  to `wrangler deploy`, consistent with the new Workers format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F8pqMfJViUaKabWKNQ9wUg
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
boj-server a06d6d3 Jun 24 2026, 04:13 PM

@hyperpolymath hyperpolymath marked this pull request as ready for review June 24, 2026 16:15
@hyperpolymath hyperpolymath merged commit afc094f into main Jun 24, 2026
18 of 19 checks passed
@hyperpolymath hyperpolymath deleted the fix/cloudflare-workers-build branch June 24, 2026 16:15
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 218 issues detected

Severity Count
🔴 Critical 15
🟠 High 131
🟡 Medium 72

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Action actions/checkout@v4 needs attention",
    "type": "unpinned_action",
    "file": "pages-deploy.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in pages-deploy.yml",
    "type": "missing_timeout_minutes",
    "file": "pages-deploy.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in scorecard-enforcer.yml",
    "type": "missing_timeout_minutes",
    "file": "scorecard-enforcer.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in scorecard-enforcer.yml",
    "type": "scorecard_publish_with_run_step",
    "file": "scorecard-enforcer.yml",
    "action": "split_scorecard_publish_job",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in instant-sync.yml",
    "type": "secret_action_without_presence_gate",
    "file": "instant-sync.yml",
    "action": "peter-evans/repository-dispatch",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "codeql_missing_actions_language",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/academic-workflow-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/ephapax-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/bofig-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/fireflag-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants