chore: fix CI

This commit is contained in:
Ralph Khreish
2025-08-19 16:09:08 +02:00
parent 7ceba2f572
commit 8a991587f1

View File

@@ -5,9 +5,9 @@ on:
branches: branches:
- next - next
paths-ignore: paths-ignore:
- 'apps/docs/**' - "apps/docs/**"
- '*.md' - "*.md"
- '.github/workflows/**' - ".github/workflows/**"
jobs: jobs:
update-docs: update-docs:
@@ -23,24 +23,24 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 2 # Need previous commit for comparison fetch-depth: 2 # Need previous commit for comparison
- name: Get changed files - name: Get changed files
id: changed-files id: changed-files
run: | run: |
echo "Changed files in this push:" echo "Changed files in this push:"
git diff --name-only HEAD^ HEAD | tee changed_files.txt git diff --name-only HEAD^ HEAD | tee changed_files.txt
# Store changed files for Claude to analyze # Store changed files for Claude to analyze
echo "changed_files<<EOF" >> $GITHUB_OUTPUT echo "changed_files<<EOF" >> $GITHUB_OUTPUT
git diff --name-only HEAD^ HEAD >> $GITHUB_OUTPUT git diff --name-only HEAD^ HEAD >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT
# Get the commit message and changes summary # Get the commit message and changes summary
echo "commit_message<<EOF" >> $GITHUB_OUTPUT echo "commit_message<<EOF" >> $GITHUB_OUTPUT
git log -1 --pretty=%B >> $GITHUB_OUTPUT git log -1 --pretty=%B >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT
# Get diff for documentation context # Get diff for documentation context
echo "commit_diff<<EOF" >> $GITHUB_OUTPUT echo "commit_diff<<EOF" >> $GITHUB_OUTPUT
git diff HEAD^ HEAD --stat >> $GITHUB_OUTPUT git diff HEAD^ HEAD --stat >> $GITHUB_OUTPUT
@@ -58,24 +58,26 @@ jobs:
with: with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
timeout_minutes: "30" timeout_minutes: "30"
mode: "auto" mode: "agent"
experimental_allowed_domains: | experimental_allowed_domains: |
.anthropic.com .anthropic.com
.github.com .github.com
api.github.com api.github.com
.githubusercontent.com .githubusercontent.com
registry.npmjs.org registry.npmjs.org
prompt: | .task-master.dev
base_branch: "next"
direct_prompt: |
You are a documentation specialist. Analyze the recent changes pushed to the 'next' branch and update the documentation accordingly. You are a documentation specialist. Analyze the recent changes pushed to the 'next' branch and update the documentation accordingly.
Recent changes: Recent changes:
- Commit: ${{ steps.changed-files.outputs.commit_message }} - Commit: ${{ steps.changed-files.outputs.commit_message }}
- Changed files: - Changed files:
${{ steps.changed-files.outputs.changed_files }} ${{ steps.changed-files.outputs.changed_files }}
- Changes summary: - Changes summary:
${{ steps.changed-files.outputs.commit_diff }} ${{ steps.changed-files.outputs.commit_diff }}
Your task: Your task:
1. Analyze the changes to understand what functionality was added, modified, or removed 1. Analyze the changes to understand what functionality was added, modified, or removed
2. Check if these changes require documentation updates in apps/docs/ 2. Check if these changes require documentation updates in apps/docs/
@@ -86,7 +88,7 @@ jobs:
- Add new documentation pages if new features were added - Add new documentation pages if new features were added
- Update the changelog or release notes if applicable - Update the changelog or release notes if applicable
4. If no documentation updates are needed, skip creating changes 4. If no documentation updates are needed, skip creating changes
Guidelines: Guidelines:
- Focus only on user-facing changes that need documentation - Focus only on user-facing changes that need documentation
- Keep documentation clear, concise, and helpful - Keep documentation clear, concise, and helpful
@@ -94,7 +96,7 @@ jobs:
- Maintain consistent documentation style with existing docs - Maintain consistent documentation style with existing docs
- Don't document internal implementation details unless they affect users - Don't document internal implementation details unless they affect users
- Update navigation/menu files if new pages are added - Update navigation/menu files if new pages are added
Only make changes if the documentation truly needs updating based on the code changes. Only make changes if the documentation truly needs updating based on the code changes.
- name: Check if changes were made - name: Check if changes were made
@@ -122,7 +124,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
git push origin ${{ steps.create-branch.outputs.branch_name }} git push origin ${{ steps.create-branch.outputs.branch_name }}
# Create PR using GitHub CLI # Create PR using GitHub CLI
gh pr create \ gh pr create \
--title "docs: update documentation for recent changes" \ --title "docs: update documentation for recent changes" \
@@ -151,4 +153,4 @@ jobs:
--base next \ --base next \
--head ${{ steps.create-branch.outputs.branch_name }} \ --head ${{ steps.create-branch.outputs.branch_name }} \
--label "documentation" \ --label "documentation" \
--label "automated" --label "automated"