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 }