Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .doc.holiday/installer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
74 changes: 37 additions & 37 deletions .github/workflows/styleguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 <<EOF
{
"platform": "github",
"version": "${{ github.sha }}",
"workflow_version": "$ACTION_VERSION",
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%S.%3NZ)",
"trigger": "${{ github.event_name }}"
}
EOF

echo "Updated installer.json with workflow version info"

- name: Generate Style Guide
uses: ./.github/actions/styleguide-action/generate-styleguide
with:
output-path: '.doc.holiday/styleguide.md'
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}

- name: Commit Style Guide
if: |
github.event_name != 'pull_request' &&
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')
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
BRANCH_NAME="chore/styleguide-update-$(date +%Y%m%d-%H%M%S)"
git checkout -b $BRANCH_NAME
git add .doc.holiday/
if git diff --staged --quiet; then
echo "No changes to commit"
echo "has_changes=false" >> $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: |
Expand Down
Loading