diff --git a/.doc.holiday/installer.json b/.doc.holiday/installer.json index fd34d3b4d4..c9744886a4 100644 --- a/.doc.holiday/installer.json +++ b/.doc.holiday/installer.json @@ -1,7 +1,7 @@ { "platform": "github", - "version": "1.3.1", - "timestamp": "2025-09-29T19:16:24.787Z", + "version": "1.3.7", + "timestamp": "2025-09-29T22:28:04.444Z", "mode": "update", "changed_files": [ ".github/workflows/styleguide.yml", diff --git a/.github/workflows/styleguide.yml b/.github/workflows/styleguide.yml index 8e547b6869..5970195fc2 100644 --- a/.github/workflows/styleguide.yml +++ b/.github/workflows/styleguide.yml @@ -24,7 +24,9 @@ on: branches: [ $default-branch ] paths: - '.github/workflows/styleguide.yml' + - '.github/actions/styleguide-action/**' - '.doc.holiday/trigger-paths.txt' + - '.doc.holiday/installer.json' - 'docs/**' - '*.md' - '**/*.md' @@ -74,60 +76,58 @@ jobs: - name: Detect Documentation Root uses: ./.github/actions/styleguide-action/detect-documentation-root id: detect-root - + + - name: Update installer version tracking + run: | + # Read version from package.json in the action directory + if [ -f ".github/actions/styleguide-action/generate-styleguide/package.json" ]; then + ACTION_VERSION=$(jq -r '.version' .github/actions/styleguide-action/generate-styleguide/package.json) + else + # Fallback: extract from the workflow files themselves + ACTION_VERSION="${{ github.run_number }}" + fi + + # Create/update installer.json with current version + mkdir -p .doc.holiday + cat > .doc.holiday/installer.json <> $GITHUB_OUTPUT - else + + # Check if there are changes to .doc.holiday/ (includes styleguide.md, installer.json, config, etc.) + if [ -n "$(git status --porcelain .doc.holiday/)" ]; then + git add .doc.holiday/ git commit -m "docs: update style guide and config [skip ci]" - git push origin $BRANCH_NAME - echo "has_changes=true" >> $GITHUB_OUTPUT - echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT + git push + echo "Committed and pushed styleguide updates (including installer.json if changed)" + else + echo "No changes to commit" fi id: commit-styleguide - - - name: Create Pull Request - if: | - github.event_name != 'pull_request' && - github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && - (github.event_name != 'workflow_dispatch' || github.event.inputs.commit-styleguide == 'true') && - steps.commit-styleguide.outputs.has_changes == 'true' - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ steps.commit-styleguide.outputs.branch_name }} - base: ${{ github.event.repository.default_branch }} - title: "docs: update style guide and configuration" - body: | - This PR contains an automated update to the documentation style guide and configuration. - - **Changes:** - - Updated style guide based on current codebase analysis - - Refreshed documentation configuration - - This is an automated update generated by the styleguide-action workflow. - draft: false - delete-branch: false - - name: Check generated files id: check-styleguide run: |