Skip to content

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

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

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

Conversation

@circleci-app

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

Copy link
Copy Markdown
Contributor

Summary

  • Added deploy-worker job to .circleci/config.yml — runs after node-checks on main branch, validates YouTube API v3 endpoint structure, then deploys src/youtube-worker.ts (the ytstudio Cloudflare Worker) via wrangler deploy. Deployment is skipped gracefully if CLOUDFLARE_API_TOKEN is not set.
  • Fixed functions/package.json — removed duplicate firebase-admin key (^10.3.0 overrode ^13.9.0 and conflicted with firebase-functions@7 peer dependency, causing npm install to fail), fixed non-existent typescript@^6.0.0 to ^5.5.0, updated node engine to 20 to match CI image.
  • Fixed ruff PTH123 violations in fix_app.py and fix_index.py — replaced open() with Path.open() so ruff check . --fix exits cleanly in the python-checks CI job.
  • Auto-fixed ruff Q000 quote style in fix_deps.py (single → double quotes per pyproject.toml config).

Workflow failures fixed

Job Root cause Fix
node-checks npm install in functions/ failed due to duplicate firebase-admin key and invalid typescript@^6.0.0 Fixed functions/package.json
python-checks ruff check . --fix exited 1 on non-auto-fixable PTH123 violations Fixed fix_app.py and fix_index.py to use Path.open()

YouTube API v3 Worker

The src/youtube-worker.ts Cloudflare Worker exposes these endpoints against channel UCrjJP_SHUeCmqpTSHJCXkdA (Ruh Al Tarikh):

  • GET /api/channel — channels?part=statistics,snippet
  • GET /api/videos — playlistItems?part=snippet,contentDetails
  • GET /api/search?q=... — search?part=snippet&type=video

Falls back to demo data if YOUTUBE_API_KEY secret binding is absent.

Test plan

  • Confirm python-checks job passes (ruff check . --fix exits 0)
  • Confirm node-checks job passes (npm install in functions/ succeeds)
  • Confirm deploy-worker job runs on main and prints YouTube API v3 endpoint info
  • Add CLOUDFLARE_API_TOKEN to CircleCI project secrets to enable live wrangler deploy

https://app.circleci.com/agents/gh/ruhdevops/chat/238a6707-7c7e-4166-b22d-beca476897dd

…ures

- Add deploy-worker job to .circleci/config.yml that validates YouTube API v3
  endpoints (channel, videos, search) and deploys src/youtube-worker.ts to
  Cloudflare Workers via wrangler (requires CLOUDFLARE_API_TOKEN secret)
- Fix functions/package.json: remove duplicate firebase-admin key (^10.3.0
  conflicted with firebase-functions@7 peer dep), fix typescript version
  from non-existent ^6.0.0 to ^5.5.0, update node engine to 20
- Fix ruff PTH123 violations in fix_app.py and fix_index.py by replacing
  open() calls with Path.open()
- Auto-fix ruff Q000 quote style in fix_deps.py (single -> double quotes)

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 Nov 1, 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 1, 2026 2:26am UTC
yt-studio-production Error Error Nov 1, 2026 2:26am 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 d8eeaf1 Nov 01 2026, 02:25 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 d8eeaf1 Nov 01 2026, 02:25 AM

@netlify

netlify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit d8eeaf1
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ae6a336e2d358ce83ddebff
😎 Deploy Preview https://deploy-preview-313--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 Nov 1, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

This branch had an error being deployed

2 failed deployments
Preview – yt-studio-production — d8eeaf17 Deployed Nov 1, 2026 by vercel[bot]
Preview – yt-studio — d8eeaf17 Deployed Nov 1, 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