Skip to content

Commit 7450e67

Browse files
KyleAMathewsclaude
andauthored
Restore only publishing docs on release (#982)
* ci: revert doc publishing workflow changes from #980 Restore the doc publishing workflow that was removed in PR #980: - Restore docs-sync.yml for daily auto-generated docs - Restore doc generation steps in release.yml after package publish - Restore NPM_TOKEN environment variable * ci: restore doc generation on release only Restore doc generation steps in release.yml that run after package publish. Remove the daily docs-sync.yml workflow - docs should only be regenerated when we release. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 36f069a commit 7450e67

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,32 @@ jobs:
4040
title: 'ci: Version Packages'
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
- name: Generate Docs
44+
if: steps.changesets.outputs.published == 'true'
45+
run: pnpm generate-docs
46+
- name: Commit Generated Docs
47+
if: steps.changesets.outputs.published == 'true'
48+
run: |
49+
if [ -n "$(git status --porcelain)" ]; then
50+
git config user.name "github-actions[bot]"
51+
git config user.email "github-actions[bot]@users.noreply.github.com"
52+
53+
BRANCH="docs/auto-update-$(date +%s)"
54+
git checkout -b "$BRANCH"
55+
git add docs/
56+
git commit -m "docs: regenerate API documentation"
57+
git push origin "$BRANCH"
58+
59+
gh pr create \
60+
--title "docs: regenerate API documentation" \
61+
--body "Automated documentation update from release" \
62+
--base main \
63+
--head "$BRANCH"
64+
else
65+
echo "No changes in generated docs"
66+
fi
67+
env:
68+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4369
- name: Comment on PRs about release
4470
if: steps.changesets.outputs.published == 'true'
4571
uses: tanstack/config/.github/comment-on-release@main

0 commit comments

Comments
 (0)