From 817e8cfd365230c14570a93bd0cdcc226870d783 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Fri, 5 Dec 2025 07:54:55 -0700 Subject: [PATCH] ci: remove docs check and add auto PR creation after release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove test:docs from CI pipelines (test:pr and test:ci) and add automated PR creation for documentation updates after releases, following the TanStack/db pattern. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/release.yml | 16 ++++++++++++++++ package.json | 5 ++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe84166d..292a180c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,7 @@ jobs: - name: Run Tests run: pnpm run test:ci - name: Run Changesets (version or publish) + id: changesets uses: changesets/action@v1.5.3 with: version: pnpm run changeset:version @@ -40,3 +41,18 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Commit Generated Docs + if: steps.changesets.outputs.published == 'true' + run: | + if [[ -n $(git status --porcelain) ]]; then + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + BRANCH_NAME="docs/auto-update-$(date +%s)" + git checkout -b $BRANCH_NAME + git add . + git commit -m "docs: regenerate API documentation" + git push origin $BRANCH_NAME + gh pr create --title "docs: regenerate API documentation" --body "Automated documentation update from release" --base main --head $BRANCH_NAME + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index f1736a42..374baaa7 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "scripts": { "clean": "pnpm --filter \"./packages/**\" run clean", "test": "pnpm run test:ci", - "test:pr": "nx affected --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build", - "test:ci": "nx run-many --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build", + "test:pr": "nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build", + "test:ci": "nx run-many --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build", "test:eslint": "nx affected --target=test:eslint --exclude=examples/**", "test:format": "pnpm run prettier --check", "test:sherif": "sherif", @@ -37,7 +37,6 @@ }, "nx": { "includedScripts": [ - "test:docs", "test:knip", "test:sherif" ]