Skip to content

feat: YouTube API v3 worker deployment + fix CI workflow failures - #308

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

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

Conversation

@circleci-app

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

Copy link
Copy Markdown
Contributor

Summary

  • Deploy YouTube API v3 Cloudflare Worker — adds a deploy-worker CI job in .circleci/config.yml that runs wrangler deploy src/youtube-worker.ts on every push to main. The worker (ytstudio) exposes /api/channel, /api/videos, and /api/search backed by YouTube Data API v3, falling back to demo data when YOUTUBE_API_KEY is absent.
  • Fix node-checks CI failure — the job was running npm run lint and tsc inside functions/ without first installing its dependencies. Added cd functions && npm install before those steps.
  • Fix functions/package.json duplicate dependency — firebase-admin appeared twice (^13.9.0 and ^10.3.0). Kept ^13.9.0. Also pinned TypeScript to ^5.5.0 (stable release; ^6.0.0 does not exist).
  • Fix root package.json duplicate entries — circletui and trigger-circleci-pipeline were duplicated in dependencies. Removed extras; trigger-circleci-pipeline remains in devDependencies.
  • Fix app/wrangler.jsonc placeholders — replaced <WORKER_NAME> → ytstudio-app and <COMPATIBILITY_DATE> → 2025-01-01.

Required secrets for worker deployment

Add these in CircleCI project environment variables to enable live deploys:

  • CLOUDFLARE_API_TOKEN — Cloudflare API token with Workers:Edit permission
  • CLOUDFLARE_ACCOUNT_ID — your Cloudflare account ID

https://app.circleci.com/agents/gh/ruhdevops/chat/6e9485e9-38b2-4226-9e96-770a195326c0

- Add deploy-worker job to .circleci/config.yml that deploys src/youtube-worker.ts
  to Cloudflare Workers (ytstudio) on main branch pushes
- Fix node-checks job: add `cd functions && npm install` step so ESLint and tsc
  can find their node_modules before running
- Fix functions/package.json: remove duplicate firebase-admin dependency (kept
  ^13.9.0, removed ^10.3.0) and downgrade typescript to ^5.5.0 (stable)
- Fix root package.json: remove duplicate circletui and trigger-circleci-pipeline
  from dependencies (trigger-circleci-pipeline remains in devDependencies)
- Fix app/wrangler.jsonc: replace <WORKER_NAME> and <COMPATIBILITY_DATE>
  placeholders with ytstudio-app and 2025-01-01

The YouTube API v3 Cloudflare Worker (src/youtube-worker.ts) exposes:
  GET /            - health check with endpoint listing
  GET /api/channel - channel statistics for UCrjJP_SHUeCmqpTSHJCXkdA
  GET /api/videos  - paginated video listing from uploads playlist
  GET /api/search  - video search within the channel
Falls back to demo data when YOUTUBE_API_KEY is not configured.

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 1:25am UTC
yt-studio-production Error Error Oct 31, 2026 1:25am UTC

@netlify

netlify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for elegant-seahorse-d9d460 failed.

Name Link
🔨 Latest commit 5927e57
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ae5439ea2bffae7b35e0683

@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 5927e57 Oct 31 2026, 01:25 AM

@netlify

netlify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

@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 5927e57 Oct 31 2026, 01:25 AM

This branch had an error being deployed

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