Skip to content
This repository was archived by the owner on Jul 15, 2026. It is now read-only.

fix: convert wiki-sync from composite action to workflow format #3

fix: convert wiki-sync from composite action to workflow format

fix: convert wiki-sync from composite action to workflow format #3

Workflow file for this run

name: 'Wiki Auto-Sync'
# Claude Code를 사용하여 코드 변경 시 Wiki를 자동으로 업데이트합니다
on:
push:
branches: [main]
workflow_dispatch:
inputs:
changed_files:
description: '변경된 파일 목록 (space-separated)'
required: false
default: 'ALL'
language:
description: '문서 언어 (en, ko, both)'
required: false
default: 'both'
timeout_minutes:
description: 'Claude 실행 타임아웃 (분)'
required: false
default: '10'
jobs:
sync-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate authentication
env:
CLAUDE_OAUTH: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
ANTHROPIC_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
if [ -z "$CLAUDE_OAUTH" ] && [ -z "$ANTHROPIC_KEY" ]; then
echo "❌ Error: Either CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY secret is required"
exit 1
fi
- name: Run Claude Code Action
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
You are a documentation expert. Analyze the code changes and update the wiki accordingly.
Changed files: ${{ inputs.changed_files || 'ALL' }}
Language: ${{ inputs.language || 'both' }}
Tasks:
0. Observe current wiki state
1. Analyze what changed in the codebase
2. Identify which wiki pages need updates
3. Update wiki/ directory with accurate documentation
4. Use [[Page-Name]] for internal wiki links
5. Include Mermaid diagrams where helpful. Don't use raw text diagrams in codeblocks.
Language instructions:
- en: English only
- ko: Korean only
- both: Create both (use -ko suffix for Korean, e.g., API.md and API-ko.md)
Output files to wiki/ directory.
allowed_tools: |
Read
Write
Edit
Bash(git diff:*, git log:*, find:*, cat:*)
timeout_minutes: ${{ inputs.timeout_minutes || '10' }}
- name: Sync to GitHub Wiki
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ ! -d "wiki" ]; then
echo "⚠️ No wiki directory found, skipping sync"
exit 0
fi
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
REPO_URL="https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.wiki.git"
git clone "$REPO_URL" wiki-repo 2>/dev/null || {
echo "⚠️ Wiki not initialized. Please create a wiki page manually first."
echo "Go to: https://github.com/${{ github.repository }}/wiki"
exit 0
}
rm -rf wiki-repo/*
cp -r wiki/* wiki-repo/
cd wiki-repo
git add -A
if git diff --staged --quiet; then
echo "ℹ️ No changes to sync"
else
git commit -m "docs: auto-update wiki from ${{ github.sha }}"
git push
echo "✅ Wiki synced successfully"
fi