Skip to content

feat: YouTube API v3 integration + CI workflow fixes for worker deploy - #319

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

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

Conversation

@circleci-app

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

Copy link
Copy Markdown
Contributor

Summary

  • YouTube API v3 worker (src/youtube-worker.ts) already implemented endpoints for channel stats, video listings (via uploads playlist), and search — with graceful demo-data fallback when YOUTUBE_API_KEY is absent
  • CircleCI validate workflow now includes build-worker (bundles the worker with esbuild) after node-checks
  • CircleCI deploy workflow added for main-only: runs python-checks → node-checks → build-worker → deploy-worker (Cloudflare wrangler deploy)
  • Ruff CI step changed from auto-fix (--fix) to check-only mode (fails on lint errors rather than silently patching them)
  • Added root-level TypeScript type check step to the node-checks job

Fixes

File What changed
.circleci/config.yml Added build-worker + deploy-worker jobs; fixed ruff command
app/wrangler.jsonc Set real worker name (yt-studio-worker) and compatibility_date (2025-01-01)
functions/package.json node engine 24→20; removed duplicate firebase-admin; removed stray lint package; pinned typescript to ^5.5.0
functions/package-lock.json Regenerated to match fixed package.json
functions/.eslintrc.js Reformatted from minified one-liner to readable config
fix_app.py / fix_deps.py / fix_index.py Reformatted to pass ruff format --check
package.json Removed duplicate trigger-circleci-pipeline from dependencies (kept in devDependencies)

Local verification

All checks verified before commit:

  • ruff check . → All checks passed
  • ruff format --check . → 59 files already formatted
  • pnpm install --frozen-lockfile → Done in 29ms
  • cd functions && npm run lint -- --max-warnings 0 → Pass
  • cd functions && node_modules/.bin/tsc --noEmit → Pass
  • node_modules/.bin/tsc --noEmit (root) → Pass
  • esbuild src/youtube-worker.ts --bundle ... → 8.7kb bundle built successfully

https://app.circleci.com/agents/gh/ruhdevops/chat/3791e3b8-9621-4fb5-a9ec-b6237f611d21

- Add build-worker and deploy-worker jobs to .circleci/config.yml
  to bundle and deploy src/youtube-worker.ts to Cloudflare (ytstudio)
- Switch ruff CI step from auto-fix to check-only mode
- Add root TypeScript type check step to node-checks job
- Fix app/wrangler.jsonc: set real worker name and compatibility date
- Fix functions/package.json: node 24->20, remove duplicate firebase-admin,
  remove lint package, pin typescript to ^5.5.0
- Regenerate functions/package-lock.json to match fixed package.json
- Reformat functions/.eslintrc.js from minified to readable
- Fix fix_app.py, fix_deps.py, fix_index.py: pass ruff lint/format checks
- Remove circletui from duplicate position in root package.json dependencies

The youtube-worker.ts fetches YouTube Data API v3 for channel stats,
video listings (via uploads playlist), and search, with demo fallback.

AI-Generated: true
@vercel

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

@bolt-new-by-stackblitz

Copy link
Copy Markdown

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

@netlify

netlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

@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 b0b2845 Nov 03 2026, 01:30 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 b0b2845 Nov 03 2026, 01:30 AM

@netlify

netlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

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