Skip to content

fix: YouTube API v3 worker CI deploy pipeline - #312

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

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

Conversation

@circleci-app

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

Copy link
Copy Markdown
Contributor

Summary

  • Fixes duplicate circletui key in package.json — wrangler was emitting a duplicate-object-key warning during deploy because the dependency appeared twice in the dependencies object. Removed the second occurrence and fixed the resulting trailing comma.
  • Adds --env="" to wrangler deploy command in .circleci/config.yml — suppresses the wrangler warning about multiple environments being defined without an explicit target, making CI output cleaner and deploy intent unambiguous.
  • deploy-worker job in the validate workflow deploys src/youtube-worker.ts as the ytstudio Cloudflare Worker with YouTube API v3 endpoints (/api/channel, /api/videos, /api/search) and falls back to demo data when YOUTUBE_API_KEY is not set.

YouTube API v3 Worker

The ytstudio Cloudflare Worker (src/youtube-worker.ts) is already implemented and ready for deploy:

Endpoint Description
GET / Health check + endpoint listing
GET /api/channel Channel stats for UCrjJP_SHUeCmqpTSHJCXkdA
GET /api/videos Paginated uploads playlist
GET /api/search?q=<query> Channel-scoped video search

All endpoints fall back to demo data when YOUTUBE_API_KEY is absent.

Test plan

  • pnpm install --frozen-lockfile — passes, lockfile unchanged
  • npm --prefix functions run lint -- --max-warnings 0 — exit 0
  • npm --prefix functions run build — exit 0 (tsc clean)
  • ruff check . — all checks passed
  • mypy . — no issues in 4 source files
  • pnpm wrangler deploy ... --dry-run — no warnings, 30.92 KiB upload

https://app.circleci.com/agents/gh/ruhdevops/chat/9a14969c-b151-4e82-8f80-850870dce06f

- Fix duplicate 'circletui' key in package.json that caused wrangler
  to emit a parse warning (duplicate-object-key)
- Add --env="" flag to wrangler deploy command in CI to suppress the
  multiple-environments warning and target the top-level config
- circleci/config.yml: add deploy-worker job with Cloudflare deployment
  of src/youtube-worker.ts (ytstudio worker) gated on node-checks passing
  on the main branch

AI-Generated: true
@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 e21860c Nov 01 2026, 01:29 AM

@vercel

vercel Bot commented Nov 1, 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 1, 2026 1:30am UTC
yt-studio-production Error Error Nov 1, 2026 1:30am UTC

@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 e21860c Nov 01 2026, 01:29 AM

@netlify

netlify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

@netlify

netlify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit e21860c
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ae695f3986ce8a324364719
😎 Deploy Preview https://deploy-preview-312--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 — e21860c5 Deployed Nov 1, 2026 by vercel[bot]
Preview – yt-studio — e21860c5 Deployed Nov 1, 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