Skip to content

Commit f8b345b

Browse files
KyleAMathewsclaudeAlemTuzlak
authored
ci: remove docs check and add auto PR creation after release (#97)
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 <noreply@anthropic.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
1 parent 52c3172 commit f8b345b

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- name: Run Tests
3232
run: pnpm run test:ci
3333
- name: Run Changesets (version or publish)
34+
id: changesets
3435
uses: changesets/action@v1.5.3
3536
with:
3637
version: pnpm run changeset:version
@@ -39,3 +40,19 @@ jobs:
3940
title: "ci: Version Packages"
4041
env:
4142
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
- name: Commit Generated Docs
45+
if: steps.changesets.outputs.published == 'true'
46+
run: |
47+
if [[ -n $(git status --porcelain) ]]; then
48+
git config user.name "github-actions[bot]"
49+
git config user.email "github-actions[bot]@users.noreply.github.com"
50+
BRANCH_NAME="docs/auto-update-$(date +%s)"
51+
git checkout -b $BRANCH_NAME
52+
git add .
53+
git commit -m "docs: regenerate API documentation"
54+
git push origin $BRANCH_NAME
55+
gh pr create --title "docs: regenerate API documentation" --body "Automated documentation update from release" --base main --head $BRANCH_NAME
56+
fi
57+
env:
58+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"scripts": {
1616
"clean": "pnpm --filter \"./packages/**\" run clean",
1717
"test": "pnpm run test:ci",
18-
"test:pr": "nx affected --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build",
19-
"test:ci": "nx run-many --targets=test:sherif,test:knip,test:docs,test:eslint,test:lib,test:types,test:build,build",
18+
"test:pr": "nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
19+
"test:ci": "nx run-many --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
2020
"test:eslint": "nx affected --target=test:eslint --exclude=examples/**",
2121
"test:format": "pnpm run prettier --check",
2222
"test:sherif": "sherif",
@@ -42,7 +42,6 @@
4242
},
4343
"nx": {
4444
"includedScripts": [
45-
"test:docs",
4645
"test:knip",
4746
"test:sherif"
4847
]

0 commit comments

Comments
 (0)