Skip to content

feat: YouTube API v3 worker deploy + fix node-checks CI failures - #249

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

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

Conversation

@circleci-app

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

Copy link
Copy Markdown
Contributor

Summary

  • Add worker-deploy CircleCI job — deploys src/youtube-worker.ts (the Cloudflare Worker that proxies YouTube Data API v3 endpoints /api/channel, /api/videos, /api/search) via pnpm run deploy:worker (wrangler). Runs only on main branch. Requires CLOUDFLARE_API_TOKEN set in CircleCI project env vars.
  • Fix node-checks job — the job was running cd functions && npm run lint and npx tsc --noEmit without ever installing functions/node_modules. Added an explicit cd functions && npm install step to unblock linting and type-checking.
  • Fix functions/package.json — three issues resolved:
    1. Duplicate firebase-admin key (^13.9.0 and ^10.3.0) — removed the stale ^10.3.0 entry
    2. "typescript": "^6.0.0" — no stable TypeScript 6 release; changed to ^5.1.6 (matches root package.json)
    3. "node": "24" engine — aligned to "20" to match the cimg/node:20.18 CI image

Files changed

File Change
.circleci/config.yml Add functions npm install step; add worker-deploy job + deploy workflow
functions/package.json Remove duplicate dep, fix TS version, fix node engine

Notes

  • The src/youtube-worker.ts worker fetches channel stats, video lists, and search results from YouTube Data API v3 for channel UCrjJP_SHUeCmqpTSHJCXkdA. It falls back to demo data when YOUTUBE_API_KEY is not set.
  • CLOUDFLARE_API_TOKEN must be configured in CircleCI project settings for the deploy step to succeed.

https://app.circleci.com/agents/gh/ruhdevops/chat/bdc85fc4-a5dc-4bbe-aa05-00c855648beb

- Add worker-deploy job to CircleCI: deploys src/youtube-worker.ts
  Cloudflare Worker (YouTube API v3 proxy) via wrangler on every push
  to main, using CLOUDFLARE_API_TOKEN from project env vars
- Fix node-checks job: add `cd functions && npm install` step before
  lint and tsc, which previously failed because functions/node_modules
  was never installed (root pnpm install doesn't touch subdirectories)
- Fix functions/package.json: remove duplicate firebase-admin key
  (had both ^13.9.0 and ^10.3.0), downgrade typescript from
  non-existent ^6.0.0 to ^5.1.6, and align node engine to 20

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 17, 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 17, 2026 1:24am UTC
yt-studio-production Error Error Oct 17, 2026 1:24am 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 9c8137d Oct 17 2026, 01:24 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 9c8137d Oct 17 2026, 01:24 AM

@netlify

netlify Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

@netlify

netlify Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

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