Skip to content
Merged
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
18 changes: 14 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ on:
jobs:
build-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -30,10 +32,18 @@ jobs:
- name: Generate API Docs
run: npx typedoc --options typedoc.json

- name: Verify wiki repository availability
env:
GH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN || github.token }}
run: |
if ! git ls-remote "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.wiki.git" HEAD >/dev/null 2>&1; then
echo "::error::GitHub wiki repository is unavailable. Enable the repository wiki and ensure token permissions allow wiki push."
exit 1
fi

- name: Sync Wiki
uses: Andrew-Chen-Wang/github-wiki-action@v4
with:
wiki_folder: docs/api
commit_message: "docs: update API documentation [skip ci]"
env:
WIKI_PUSH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }}
token: ${{ secrets.WIKI_ACTION_TOKEN || github.token }}
path: docs/api
commit-message: "docs: update API documentation [skip ci]"
Loading