Skip to content

feat: YouTube API v3 worker deploy + fix CI workflow failures - #247

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

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

Conversation

@circleci-app

@circleci-app circleci-app Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • YouTube API v3 Worker: src/youtube-worker.ts provides /api/channel, /api/videos, and /api/search endpoints for channel UCrjJP_SHUeCmqpTSHJCXkdA via Cloudflare Workers. The wrangler.jsonc targets this worker as ytstudio.
  • New CI jobs: worker-validate (type-checks worker, validates wrangler config) and worker-deploy (deploys to Cloudflare on main; gracefully skips if CLOUDFLARE_API_TOKEN is unset).
  • Fixed node-checks job: upgraded to cimg/node:22.x and added npm install --legacy-peer-deps in functions/ before running ESLint — previously the job attempted to lint without installing function-level deps.
  • Fixed functions/package.json: removed duplicate firebase-admin key (the second "^10.3.0" entry was winning JSON parse and breaking the firebase-functions@7 peer dep constraint). Updated node engine from "24" to ">=20".
  • Fixed functions/.eslintrc.js: reformatted from a 483-char minified one-liner to readable multi-line format. The Google ESLint config enforces max-len: 80, so the file was failing its own lint rules. Added .eslintrc.js to ignorePatterns as well.

Test plan

  • validate workflow: python-checks, node-checks, worker-validate all pass
  • deploy workflow: worker-deploy runs on merge to main (set CLOUDFLARE_API_TOKEN in CircleCI project env for live deploy)
  • Worker endpoints accessible at https://ytstudio.<account>.workers.dev/api/channel, /api/videos, /api/search

https://app.circleci.com/agents/gh/ruhdevops/chat/aa790f6c-eecd-43eb-acf6-b346b769445c

1. YouTube API v3 worker (src/youtube-worker.ts) already implemented with
   /api/channel, /api/videos, /api/search endpoints for channel UCrjJP_SHUeCmqpTSHJCXkdA.

2. .circleci/config.yml — three workflow fixes and new jobs:
   - node-checks: upgrade to cimg/node:22.x (was 20.18), add
     `npm install --legacy-peer-deps` in functions/ before linting
   - worker-validate: new job — installs pnpm deps, runs tsc on the
     Cloudflare worker, validates wrangler.jsonc
   - worker-deploy: new job — deploys ytstudio worker to Cloudflare on
     every push to main (gracefully skips when CLOUDFLARE_API_TOKEN unset)
   - deploy workflow: new workflow running worker-deploy on main branch

3. functions/package.json — two bugs fixed:
   - Duplicate firebase-admin keys; second entry "^10.3.0" was winning
     in JSON parse and conflicting with firebase-functions@7 peer dep.
     Removed duplicate; kept "^13.9.0".
   - node engine "24" changed to ">=20" for CircleCI Node 22 compat.

4. functions/.eslintrc.js — reformatted from minified one-liner.
   The Google ESLint config enforces max-len:80; the 483-char single line
   was failing its own lint rules. Also added .eslintrc.js to ignorePatterns.

AI-Generated: true
@bolt-new-by-stackblitz

Copy link
Copy Markdown

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

@vercel

vercel Bot commented Oct 16, 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 Oct 16, 2026 8:25pm UTC
yt-studio-production Error Error Oct 16, 2026 8:25pm 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 b2903b1 Oct 16 2026, 08:25 PM

@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 b2903b1 Oct 16 2026, 08:25 PM

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit b2903b1
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ad2883f8f08d333449bca7a
😎 Deploy Preview https://deploy-preview-247--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 — b2903b1b Deployed Oct 16, 2026 by vercel[bot]
Preview – yt-studio-production — b2903b1b Deployed Oct 16, 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