Skip to content

feat: deploy YouTube API v3 worker and fix CI workflow failures - #246

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

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

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 fetches live channel stats, video lists, and search results from the YouTube Data API v3 (UCrjJP_SHUeCmqpTSHJCXkdA). Falls back to demo data when no API key is bound.
  • Cloudflare Worker deploy job — added deploy-worker job to .circleci/config.yml that runs pnpm run deploy:worker (→ wrangler deploy) on every push to main using CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID project-level env vars.
  • CI workflow fixes — resolved failures in both the validate and deploy workflows:
    • python-checks: replaced bare open() calls in fix_app.py and fix_index.py with Path.open() / Path.read_text() (ruff PTH123); auto-fixed 11 additional ruff violations (Q000, UP015, Q004, F401); ruff now exits clean.
    • node-checks: upgraded Docker image to cimg/node:22.11, separated root (pnpm) and functions (npm --legacy-peer-deps) install steps, fixed functions/package.json (removed duplicate firebase-admin, removed stray lint dep, pinned typescript to ^5.6.0, set engines.node ≥ 20).
    • functions/.eslintrc.js: reformatted from minified one-liner to readable; ESLint still passes with --max-warnings 0.
    • pnpm-workspace.yaml: added explicit packages: ['.'] and extended allowBuilds for @parcel/watcher, protobufjs, unrs-resolver.

Test plan

  • pnpm run type-check — TypeScript (Cloudflare Worker) exits 0
  • npm run lint --prefix functions -- --max-warnings 0 — ESLint exits 0
  • npm run build --prefix functions — tsc exits 0
  • ruff check . — exits 0 (all 27 violations resolved)
  • CircleCI validate workflow (python-checks + node-checks) green
  • CircleCI deploy workflow deploys worker to Cloudflare on merge to main (requires CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID set in project settings)

https://app.circleci.com/agents/gh/ruhdevops/chat/d2b1f530-7ac5-4c0c-a84c-4bdaa5b58123

- Add deploy-worker job to .circleci/config.yml targeting Cloudflare Workers
  with CLOUDFLARE_API_TOKEN/CLOUDFLARE_ACCOUNT_ID env vars on main branch
- Upgrade node-checks job to cimg/node:22.11 with separate root (pnpm) and
  functions (npm --legacy-peer-deps) install steps
- Add validate and deploy workflows to organize CI/CD stages
- Fix python-checks workflow failures: replace builtin open() with Path.open()
  across fix_app.py and fix_index.py so ruff PTH123 rule passes clean
- Auto-fix 11 remaining ruff violations (Q000, UP015, Q004, F401) across
  Python utility scripts; reformat fix_deps.py
- Fix functions/package.json: remove duplicate firebase-admin entry, remove
  extraneous lint dep, downgrade typescript from ^6 to ^5.6.0, set
  engines.node to >=20
- Update functions/package-lock.json to match fixed package.json
- Reformat functions/.eslintrc.js from minified to readable
- Update pnpm-workspace.yaml: add explicit packages section and extend
  allowBuilds with @parcel/watcher, protobufjs, unrs-resolver
- Add functions/pnpm-lock.yaml generated from pnpm install in functions/

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 7:34pm UTC
yt-studio-production Error Error Oct 16, 2026 7:34pm UTC

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

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

@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 e0948c9 Oct 16 2026, 07:34 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 e0948c9 Oct 16 2026, 07:34 PM

This branch had an error being deployed

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