Skip to content

Commit 7462139

Browse files
committed
\Add debug output and force comment posting\n\nForce workflow to always create a comment for testing purposes:\n- Add debugging steps to trace file detection and output\n- Force has_changes to always be true\n- Add placeholder content if no docs files found\n\n\ud83e\udd16 Generated with [Claude Code](https://claude.ai/code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\
1 parent 27760e2 commit 7462139

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

.github/actions/docs-preview/action.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ runs:
5656
exit 1
5757
fi
5858
59+
- name: Debug inputs
60+
shell: bash
61+
run: |
62+
echo "Docs dir: ${{ inputs.docs-dir }}"
63+
echo "Manifest changed: ${{ inputs.manifest-changed }}"
64+
echo "First few changed files:"
65+
echo '${{ inputs.changed-files }}' | jq -r '.[] | select(startswith("${{ inputs.docs-dir }}/"))' | head -n 5
66+
5967
- name: Analyze docs changes
6068
id: docs-analysis
6169
shell: bash
@@ -67,18 +75,23 @@ runs:
6775
DOC_FILES_COUNT=$(jq -r '.[] | select(startswith("${{ inputs.docs-dir }}/"))' changed_files.json | wc -l)
6876
echo "doc_files_count=$DOC_FILES_COUNT" >> $GITHUB_OUTPUT
6977
78+
# Force to true for debugging
79+
DOC_FILES_COUNT=1
80+
7081
# Format changed files for comment
7182
FORMATTED_FILES=$(jq -r '.[] | select(startswith("${{ inputs.docs-dir }}/")) | "- `" + . + "`"' changed_files.json)
83+
84+
# Add a minimum placeholder if no files found
85+
if [ -z "$FORMATTED_FILES" ]; then
86+
FORMATTED_FILES="- Test file - debugging workflow"
87+
fi
88+
7289
echo "changed_files<<EOF" >> $GITHUB_OUTPUT
7390
echo "$FORMATTED_FILES" >> $GITHUB_OUTPUT
7491
echo "EOF" >> $GITHUB_OUTPUT
7592
76-
# Determine if docs have changed
77-
if [ "$DOC_FILES_COUNT" -gt 0 ]; then
78-
echo "has_changes=true" >> $GITHUB_OUTPUT
79-
else
80-
echo "has_changes=false" >> $GITHUB_OUTPUT
81-
fi
93+
# Determine if docs have changed - force true for testing
94+
echo "has_changes=true" >> $GITHUB_OUTPUT
8295
8396
# Clean up sensitive file
8497
rm -f changed_files.json

.github/workflows/docs-preview.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
files: |
4343
docs/**
4444
45+
- name: Debug changed files
46+
run: |
47+
echo "All changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
48+
echo "JSON format: ${{ steps.changed-files.outputs.all_changed_files_json }}"
49+
4550
- name: Check if manifest changed
4651
id: manifest-check
4752
run: |
@@ -55,6 +60,13 @@ jobs:
5560
changed-files: ${{ steps.changed-files.outputs.all_changed_files_json }}
5661
manifest-changed: ${{ steps.manifest-check.outputs.changed }}
5762

63+
- name: Debug outputs
64+
run: |
65+
echo "Has changes: ${{ steps.docs-preview.outputs.has_changes }}"
66+
echo "URL: ${{ steps.docs-preview.outputs.url }}"
67+
echo "Changed files:"
68+
echo "${{ steps.docs-preview.outputs.changed_files }}"
69+
5870
- name: Find existing comment
5971
if: steps.docs-preview.outputs.has_changes == 'true'
6072
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy