From 2774dabe27cca08aeee24f3e5a41dcf1b3d839c1 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Fri, 7 Nov 2025 13:26:23 +0800 Subject: [PATCH] Add Dependabot config and simplify deploy workflow Introduces .github/dependabot.yml to automate dependency updates for npm and GitHub Actions. Streamlines the deploy job in depoly.yml by removing setup, install, lint, type-check, and test steps, focusing only on code checkout and deployment via Wrangler. --- .github/dependabot.yml | 44 ++++++++++++++++++++++++++++++++++++ .github/workflows/depoly.yml | 25 ++------------------ 2 files changed, 46 insertions(+), 23 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b381048 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,44 @@ +version: 2 +updates: + # Maintain npm dependencies + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + time: "09:00" + open-pull-requests-limit: 10 + groups: + npm_and_yarn: + patterns: + - "*" + commit-message: + prefix: "chore" + prefix-development: "chore" + include: "scope" + labels: + - "dependencies" + - "npm" + reviewers: + - "xixu-me" + assignees: + - "xixu-me" + + # Maintain GitHub Actions workflows + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + time: "09:00" + open-pull-requests-limit: 5 + commit-message: + prefix: "ci" + include: "scope" + labels: + - "dependencies" + - "github-actions" + reviewers: + - "xixu-me" + assignees: + - "xixu-me" diff --git a/.github/workflows/depoly.yml b/.github/workflows/depoly.yml index 0ea311c..dab9aac 100644 --- a/.github/workflows/depoly.yml +++ b/.github/workflows/depoly.yml @@ -17,30 +17,9 @@ jobs: deploy: runs-on: ubuntu-latest timeout-minutes: 60 - name: Deploy to Cloudflare Workers steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Run linter - run: npm run lint - - - name: Run type check - run: npm run type-check - - - name: Run tests - run: npm test - - - name: Build & Deploy Worker + - uses: actions/checkout@v4 + - name: Deploy Worker uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}