From 9db99003da0a007ccffd2d29a717a69bfe95fd1e Mon Sep 17 00:00:00 2001 From: harhao Date: Fri, 29 May 2026 17:19:53 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-docs-agent.yml | 66 ------------------------- .github/workflows/publish-npm.yml | 7 --- .husky/pre-commit | 2 +- 3 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 .github/workflows/deploy-docs-agent.yml diff --git a/.github/workflows/deploy-docs-agent.yml b/.github/workflows/deploy-docs-agent.yml deleted file mode 100644 index b4ba446..0000000 --- a/.github/workflows/deploy-docs-agent.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: deploy-docs-agent - -on: - push: - branches: - - master - paths: - - 'packages/bundlekit-docs-agent/**' - workflow_dispatch: # 允许手动触发 - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - # 1. 拉取代码 - - name: Checkout code - uses: actions/checkout@v4 - - # 2. 设置 pnpm 环境 - - name: Setup pnpm - uses: pnpm/action-setup@v3 - with: - version: 8 - - # 3. 设置 Node.js 环境并开启 pnpm 缓存 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: 'pnpm' - - # 4. 安装依赖 - - name: Install dependencies - run: pnpm install --no-frozen-lockfile - - # 5. 验证 Secrets 是否正确配置 - - name: Check Secrets - run: | - if [ -z "$API_TOKEN" ]; then - echo "CLOUDFLARE_API_TOKEN is EMPTY or NOT SET" - exit 1 - else - echo "CLOUDFLARE_API_TOKEN exists, length=${#API_TOKEN}" - fi - if [ -z "$ACCOUNT_ID" ]; then - echo "CLOUDFLARE_ACCOUNT_ID is EMPTY or NOT SET" - exit 1 - else - echo "CLOUDFLARE_ACCOUNT_ID exists, length=${#ACCOUNT_ID}" - fi - env: - API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - - # 6. 构建项目 - - name: Build project - run: pnpm build --filter=@bundlekit/docs-agent... - - # 7. 部署到 Cloudflare Workers - - name: Deploy to Cloudflare Workers - uses: cloudflare/wrangler-action@v3 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - packageManager: pnpm - command: deploy --name=bundlekit-docs-agent --compatibility-date=2026-05-25 \ No newline at end of file diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index a843d8c..5001246 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -43,13 +43,6 @@ jobs: - name: Run unit tests run: pnpm test - - name: Run integration tests (build + dev-spa + dev-ssr + cli) - run: pnpm vitest run --config vitest.integration.config.ts --reporter=verbose "build|dev-spa|dev-ssr|cli" - - - name: Run integration tests (dev-smoke) - run: pnpm vitest run --config vitest.integration.config.ts --reporter=verbose "dev-smoke" - timeout-minutes: 15 - - name: Verify package contents run: pnpm verify:pack diff --git a/.husky/pre-commit b/.husky/pre-commit index cb2c84d..32b3b8a 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -pnpm lint-staged +pnpm test && pnpm test:integration