From 9c8137d69a48b1253c79b49cf17c114294d84a6e Mon Sep 17 00:00:00 2001 From: "circleci-app[bot]" <127350680+circleci-app[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2026 01:24:25 +0000 Subject: [PATCH] feat: add YouTube API v3 worker deploy + fix CI workflow failures - 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 --- .circleci/config.yml | 27 ++++++++++++++++++++++++++- functions/package.json | 5 ++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bb176b74..5c32ca05 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,10 +29,15 @@ jobs: steps: - checkout - run: - name: Install dependencies + name: Install root dependencies command: | sudo npm install -g pnpm pnpm install --frozen-lockfile + - run: + name: Install functions dependencies + command: | + cd functions + npm install - run: name: Run linting command: | @@ -47,9 +52,29 @@ jobs: name: Quality GC check command: npx quality-gc run || echo "Quality GC issues found" + worker-deploy: + docker: + - image: cimg/node:20.18 + steps: + - checkout + - run: + name: Install dependencies + command: | + sudo npm install -g pnpm + pnpm install --frozen-lockfile + - run: + name: Deploy YouTube API v3 Worker to Cloudflare + command: pnpm run deploy:worker + workflows: version: 2 validate: jobs: - python-checks - node-checks + deploy: + jobs: + - worker-deploy: + filters: + branches: + only: main diff --git a/functions/package.json b/functions/package.json index 458cedb5..29a2203f 100644 --- a/functions/package.json +++ b/functions/package.json @@ -11,12 +11,11 @@ "logs": "firebase functions:log" }, "engines": { - "node": "24" + "node": "20" }, "main": "lib/index.js", "dependencies": { "firebase-admin": "^13.9.0", - "firebase-admin": "^10.3.0", "firebase-functions": "^7.0.0", "lint": "^1.2.2" }, @@ -27,7 +26,7 @@ "eslint-config-google": "^0.14.0", "eslint-plugin-import": "^2.25.4", "firebase-functions-test": "^3.4.1", - "typescript": "^6.0.0" + "typescript": "^5.1.6" }, "private": true }