Skip to content

fix: resolve CI workflow failures and add Cloudflare Worker deploy - #324

Open
circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/fix-ci-workflows-and-worker-deploy
Open

circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/fix-ci-workflows-and-worker-deploy

Conversation

@circleci-app

@circleci-app circleci-app Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixed functions/package.json: removed duplicate firebase-admin key (kept ^13.9.0), removed spurious lint runtime dependency, corrected typescript from non-existent ^6.0.0 → ^5.5.0, fixed node engine from 24 → 20
  • Generated app/worker-configuration.d.ts: file was referenced in app/tsconfig.json's include but was absent; generated via wrangler types
  • Updated .circleci/config.yml:
    • Added missing worker-checks job definition (was listed in validate workflow but the job was never defined — this caused CI to fail on every run)
    • Added worker-deploy job: runs wrangler deploy on main branch using CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID secrets
    • Fixed node-checks: install functions/ deps before running lint/tsc, use node_modules/.bin/tsc instead of bare npx tsc, replaced broken npx quality-gc run with pnpm run enhance fallback
    • Wired worker-checks and worker-deploy into the validate workflow

Worker Endpoints (YouTube API v3)

The deployed Cloudflare Worker (ytstudio) exposes:

  • GET / or GET /health — health check
  • GET /api/channel — channel info (uses YOUTUBE_API_KEY + CHANNEL_ID env vars)
  • GET /api/videos — paginated video list; falls back to demo data when no key is set
  • GET /api/search?q=<query> — search within the channel

Test plan

  • All 5 worker unit tests pass (npm test -- --run in app/)
  • TypeScript type check passes (tsc --noEmit in app/)
  • Python ruff + mypy checks pass
  • functions/ npm install completes without errors (no duplicate key, valid TS version)
  • CI validate workflow: python-checks, node-checks, worker-checks all green
  • worker-deploy job deploys to Cloudflare on main merge (requires CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID CI env vars)

https://app.circleci.com/agents/gh/ruhdevops/chat/55a2194e-dc4b-47b0-85ec-84b0b3b63199

- Fix functions/package.json: remove duplicate firebase-admin key,
  remove spurious lint runtime dep, downgrade typescript from non-existent
  ^6.0.0 to ^5.5.0, and correct node engine from 24 to 20
- Generate app/worker-configuration.d.ts via wrangler types so tsconfig
  include reference resolves correctly
- Update .circleci/config.yml:
  - Add missing worker-checks job definition (was referenced in workflow
    but definition was absent)
  - Add worker-deploy job that runs wrangler deploy on main branch with
    CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID env vars
  - Fix node-checks: install functions deps before lint/tsc, use
    node_modules/.bin/tsc instead of npx tsc, replace missing
    npx quality-gc with pnpm run enhance fallback
  - Wire worker-checks and worker-deploy into validate workflow

AI-Generated: true
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
yt-studio Error Error Nov 4, 2026 1:37am UTC
yt-studio-production Error Error Nov 4, 2026 1:37am UTC

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

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
ytstudio 54dfc9b Nov 04 2026, 01:37 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

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
ytstudio 54dfc9b Nov 04 2026, 01:37 AM

@netlify

netlify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

Name Link
🔨 Latest commit 54dfc9b
🔍 Latest deploy log https://app.netlify.com/projects/ytr-studio/deploys/6aea8c63ae65fc7d422b7171

@netlify

netlify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit 54dfc9b
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6aea8c63669488b4b340a41e
😎 Deploy Preview https://deploy-preview-324--elegant-seahorse-d9d460.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch had an error being deployed

2 failed deployments
Preview – yt-studio-production — 54dfc9b9 Deployed Nov 4, 2026 by vercel[bot]
Preview – yt-studio — 54dfc9b9 Deployed Nov 4, 2026 by vercel[bot]
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.

0 participants