Skip to content

feat: YouTube API v3 worker deploy + CI pipeline fixes - #310

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

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

Conversation

@circleci-app

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

Copy link
Copy Markdown
Contributor

Summary

  • YouTube API v3 Worker (src/youtube-worker.ts): Fetches live data from YouTube Data API v3 for channel UCrjJP_SHUeCmqpTSHJCXkdA (Ruh Al Tarikh). Endpoints: /api/channel (stats), /api/videos (uploads playlist), /api/search. Gracefully falls back to demo data when YOUTUBE_API_KEY secret binding is absent.
  • CircleCI pipeline (.circleci/config.yml): Added worker-checks job (TypeScript type-check + wrangler config validation) and worker-deploy job (Cloudflare Workers deployment via pnpm run deploy:worker). New deploy workflow triggers on main only; deploy is a no-op if CF_API_TOKEN is not set in project settings.
  • functions/package.json: Fixed node engine 24→18, removed duplicate firebase-admin entry and spurious lint dependency, downgraded TypeScript ^6.0.0→^5.8.0 (v6 not yet stable).
  • functions/.eslintrc.js: Reformatted from minified single-line to readable multi-line (semantically identical).
  • package.json: Added wrangler ^4.90.0 as proper devDependency; replaced npx wrangler calls with the installed binary; removed Windows-only clean scripts.
  • pnpm-lock.yaml / functions/package-lock.json: Synced to match updated manifests.

Workflow Verification

All checks verified locally before opening this PR:

Check Status
ruff check + ruff format ✅ Pass
mypy --ignore-missing-imports ✅ Pass
pytest ✅ Pass (no tests yet)
pnpm install --frozen-lockfile ✅ Pass
functions npm install --legacy-peer-deps ✅ Pass
functions eslint --max-warnings 0 ✅ Pass
functions tsc --noEmit ✅ Pass
root tsc --noEmit (worker type-check) ✅ Pass

To enable live Cloudflare deployment, add CF_API_TOKEN to CircleCI project environment variables.

https://app.circleci.com/agents/gh/ruhdevops/chat/5901d6ed-4f71-4f92-b4fe-e491442c13b5

- Implement YouTube Data API v3 fetching in src/youtube-worker.ts:
  /api/channel (stats), /api/videos (uploads playlist), /api/search
  Falls back to demo data when YOUTUBE_API_KEY is not set.
- Add worker-checks and worker-deploy jobs to .circleci/config.yml;
  deploy workflow targets main branch via wrangler deploy.
- Fix functions/package.json: node 24→18, remove duplicate firebase-admin
  and bad 'lint' dep, TypeScript 6.0→5.8.
- Fix functions/.eslintrc.js: reformat from minified to readable (no logic change).
- Fix package.json: add wrangler devDep, replace npx wrangler with installed binary.
- Sync pnpm-lock.yaml and functions/package-lock.json to match manifests.

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 31, 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 31, 2026 3:32am UTC
yt-studio-production Error Error Oct 31, 2026 3:32am 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 8fa56f0 Oct 31 2026, 03:31 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 8fa56f0 Oct 31 2026, 03:31 AM

@netlify

netlify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit 8fa56f0
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ae5612f74bd3daaff889d38
😎 Deploy Preview https://deploy-preview-310--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.

@netlify

netlify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

This branch had an error being deployed

2 failed deployments
Preview – yt-studio — 8fa56f05 Deployed Oct 31, 2026 by vercel[bot]
Preview – yt-studio-production — 8fa56f05 Deployed Oct 31, 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