Publishing to GitHub Wiki - hiro-nyon/cesium-heatbox GitHub Wiki
v0.1.6 introduced GitHub Wiki automatic synchronization functionality. Changes to docs/api, README.md, and CHANGELOG.md are automatically reflected in the Wiki.
File: .github/workflows/wiki-sync.yml
Trigger Conditions:
- Push changes to
docs/onmainbranch - Push changes to
wiki/folder - Changes to
README.md,CHANGELOG.md - Manual execution (
workflow_dispatch)
Permission Requirements:
-
GITHUB_TOKEN(basic permissions) - Or
WIKI_TOKENPersonal Access Token (recommended)
# Document generation + Wiki sync + GitHub Wiki publishing (complete process)
npm run wiki:update
# Individual execution
npm run docs # JSDoc generation
npm run wiki:sync # docs/api → wiki/ conversion
npm run wiki:publish # Push to GitHub Wikicesium-heatbox/
├── .github/workflows/wiki-sync.yml # Automation workflow
├── docs/api/ # JSDoc generation (source)
├── wiki/ # Markdown conversion results
├── tools/
│ ├── wiki-sync.js # docs/api → wiki/ conversion
│ └── wiki/publish-wiki.sh # GitHub Wiki push
└── docs/wiki-maintenance.md # This procedure document
- GitHub → Settings → Developer settings → Personal access tokens
- "Generate new token (classic)"
- Permission selection:
-
repo(full access) - Or minimum permissions:
public_repo+ Wiki write permissions
-
- Copy generated token
- Repository → Settings → Secrets and variables → Actions
- Create new secret:
WIKI_TOKEN= {generated token}
# Manual test
npm run wiki:update
# GitHub Actions manual execution
# Repository → Actions → "Wiki Sync" → "Run workflow"- Check https://github.com/hiro-nyon/cesium-heatbox/wiki
- Verify Home.md, Release-Notes.md are correctly updated
- Check API-related pages are generated
- Push docs/ changes to
mainbranch - Wiki automatically updates after 2-3 minutes
- Check https://github.com/hiro-nyon/cesium-heatbox/wiki as needed
# Execute complete process locally
npm run wiki:update
# Execute with GitHub Actions (force sync)
# Repository → Actions → "Wiki Sync" → "Run workflow" → force_sync: true-
If automation fails:
npm run wiki:publish # Manually push to GitHub Wiki -
To revert Wiki contents:
git clone https://github.com/hiro-nyon/cesium-heatbox.wiki.git cd cesium-heatbox.wiki git log --oneline # Check commit history git reset --hard <previous_good_commit> git push --force-with-lease origin master
-
To return to completely manual operation:
- Disable
.github/workflows/wiki-sync.yml - Use existing
tools/wiki/publish-wiki.sh
- Disable
-
remote: Permission denied- Check
WIKI_TOKENpermissions - Check token expiration
- Check repository access permissions
- Check
-
No changes to commit to wiki- Normal operation (behavior when no changes)
- Force sync: Execute manually with
force_sync: true
-
Wiki changes detected but sync failed- Check Wiki repository status
- Execute manual fallback
-
Check GitHub Actions logs: Repository → Actions → relevant workflow → detailed logs
-
Test with local execution:
npm run wiki:sync # Test conversion only npm run wiki:publish # Test push only
-
Check differences:
git diff wiki/ # Check conversion results
- Check Wiki content consistency
- Check for broken links
- Check GitHub Actions execution history
- Check Personal Access Token expiration
- Improve JSDoc → Markdown conversion quality
- Unify Wiki templates
- Enhance difference notifications
- Integration with CI/CD pipeline
v0.1.6でGitHub Wikiの自動同期機能を導入。docs/api、README.md、CHANGELOG.md の変更が自動的にWikiに反映される。
ファイル: .github/workflows/wiki-sync.yml
トリガー条件:
-
mainブランチへのdocs/変更push -
wiki/フォルダ変更push -
README.md、CHANGELOG.md変更push - 手動実行(
workflow_dispatch)
権限要件:
-
GITHUB_TOKEN(基本権限) - または
WIKI_TOKENPersonal Access Token(推奨)
# ドキュメント生成 + Wiki同期 + GitHub Wiki公開(全工程)
npm run wiki:update
# 個別実行
npm run docs # JSDoc生成
npm run wiki:sync # docs/api → wiki/ 変換
npm run wiki:publish # GitHub Wikiにpushcesium-heatbox/
├── .github/workflows/wiki-sync.yml # 自動化workflow
├── docs/api/ # JSDoc生成(ソース)
├── wiki/ # Markdown変換結果
├── tools/
│ ├── wiki-sync.js # docs/api → wiki/ 変換
│ └── wiki/publish-wiki.sh # GitHub Wiki push
└── docs/wiki-maintenance.md # この手順書
- GitHub → Settings → Developer settings → Personal access tokens
- "Generate new token (classic)"
- 権限選択:
-
repo(フルアクセス) - または最小権限:
public_repo+ Wiki write権限
-
- 生成されたトークンをコピー
- Repository → Settings → Secrets and variables → Actions
- 新しいsecret作成:
WIKI_TOKEN= {生成したトークン}
# 手動テスト
npm run wiki:update
# GitHub Actions手動実行
# Repository → Actions → "Wiki Sync" → "Run workflow"- https://github.com/hiro-nyon/cesium-heatbox/wiki を確認
- Home.md、Release-Notes.md が正しく更新されているか
- API関連ページが生成されているか
-
mainブランチに docs/ 変更をpush - 2-3分後にWikiが自動更新される
- 必要に応じて https://github.com/hiro-nyon/cesium-heatbox/wiki で確認
# ローカルで全工程実行
npm run wiki:update
# GitHub Actionsで実行(force sync)
# Repository → Actions → "Wiki Sync" → "Run workflow" → force_sync: true-
自動化が失敗した場合:
npm run wiki:publish # 手動でGitHub Wikiにpush -
Wikiの内容を元に戻したい場合:
git clone https://github.com/hiro-nyon/cesium-heatbox.wiki.git cd cesium-heatbox.wiki git log --oneline # コミット履歴確認 git reset --hard <前の正常なコミット> git push --force-with-lease origin master
-
完全手動運用に戻す場合:
-
.github/workflows/wiki-sync.ymlを無効化 - 既存の
tools/wiki/publish-wiki.shを使用
-
-
remote: Permission denied-
WIKI_TOKENの権限確認 - トークンの有効期限確認
- リポジトリアクセス権限確認
-
-
No changes to commit to wiki- 正常動作(変更がない場合の動作)
- 強制同期:
force_sync: trueで手動実行
-
Wiki changes detected but sync failed- Wikiリポジトリの状態確認
- 手動フォールバック実行
-
GitHub Actions ログ確認: Repository → Actions → 該当workflow → 詳細ログ
-
ローカル実行でテスト:
npm run wiki:sync # 変換のみテスト npm run wiki:publish # push のみテスト
-
差分確認:
git diff wiki/ # 変換結果の確認
- Wiki内容の整合性確認
- リンク切れチェック
- GitHub Actions実行履歴確認
- Personal Access Token有効期限確認
- JSDoc → Markdown変換品質向上
- Wiki テンプレート統一
- 差分通知の強化
- CI/CDパイプラインとの統合