skillhub/.github/workflows/deepwiki.yml
XiaoSeS 16fea87abf
fix(ci): verify complete and fresh DeepWiki crawl results (#1015)
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-10-25 18:52:03 +08:00

61 lines
1.8 KiB
YAML

name: DeepWiki Documentation Crawler
on:
release:
types: [published]
workflow_dispatch:
concurrency:
group: deepwiki-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
crawl:
name: Crawl DeepWiki Documentation
runs-on: ubuntu-latest
timeout-minutes: 10
env:
CRAWLER_DIR: ${{ github.workspace }}/.deepwiki-crawler
REPOSITORY: ${{ github.repository }}
# The pinned crawler schedules extra workers before updating its active
# count. Use its sequential path to avoid an unbounded scheduling loop.
MAX_CONCURRENCY: '1'
REQUEST_TIMEOUT: '30000'
RETRY_ATTEMPTS: '3'
USER_AGENT: DeepWiki-Crawler/1.0
steps:
- name: Check out workflow helpers
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Check out pinned crawler source
uses: actions/checkout@v4
with:
repository: erayack/deepwiki-action
ref: b9fc8378235f298d736d12c5f4651d6ea0820c61
path: .deepwiki-crawler
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install crawler runtime dependencies
# Install beside the scripts: Node resolves require() from their directory,
# not the shell's cwd. Pin CommonJS-compatible versions; skip lifecycle hooks.
shell: bash
run: |
set -euo pipefail
npm install --prefix "$CRAWLER_DIR" --ignore-scripts --no-audit --no-fund --package-lock=false --save-exact node-fetch@2.7.0 cheerio@1.0.0
- name: Check repository and crawl DeepWiki
shell: bash
run: |
set -euo pipefail
[[ "$REPOSITORY" =~ ^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$ ]]
node "$GITHUB_WORKSPACE/scripts/run-deepwiki.cjs" "$CRAWLER_DIR" "$REPOSITORY"