11name : " Wiki Sync"
2- description : " Analyze main-branch changes and update internal-technical-docs via LiteLLM and repository_dispatch"
2+ description : " Analyze main-branch changes and update knowledge-base via LiteLLM and repository_dispatch"
33
44inputs :
55 github_app_id :
@@ -15,8 +15,9 @@ inputs:
1515 required : true
1616
1717 docs_repository :
18- description : " Docs/wiki repository name (e.g. internal-technical-docs)"
19- required : true
18+ description : " Docs/wiki repository name (e.g. knowledge-base)"
19+ required : false
20+ default : " knowledge-base"
2021
2122 docs_branch :
2223 description : " Branch to push wiki updates to"
@@ -61,48 +62,19 @@ runs:
6162 fi
6263 python3 -m pip install --disable-pip-version-check -r "${{ github.action_path }}/scripts/requirements.txt"
6364
64- - name : Create GitHub App token
65- id : app-token
66- uses : actions/create-github-app-token@v2
67- with :
68- app-id : ${{ inputs.github_app_id }}
69- private-key : ${{ inputs.github_app_private_key }}
70- owner : ${{ inputs.docs_repository_owner }}
71- repositories : |
72- ${{ inputs.docs_repository }}
73-
74- - name : Checkout docs repository
75- uses : actions/checkout@v4
76- with :
77- repository : ${{ inputs.docs_repository_owner }}/${{ inputs.docs_repository }}
78- ref : ${{ inputs.docs_branch }}
79- token : ${{ steps.app-token.outputs.token }}
80- persist-credentials : false
81- path : wiki-docs
82-
83- - name : Sync wiki from source changes
65+ - name : Run wiki sync script
8466 shell : bash
85- env :
86- GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
87- LITELLM_BASE_URL : ${{ inputs.litellm_base_url }}
88- LITELLM_API_KEY : ${{ inputs.litellm_api_key }}
89- GITHUB_REPOSITORY : ${{ github.repository }}
90- GITHUB_SHA : ${{ inputs.after_sha != '' && inputs.after_sha || github.sha }}
91- GITHUB_EVENT_BEFORE : ${{ inputs.before_sha }}
9267 run : |
93- DRY_RUN_FLAG=""
94- if [ "${{ inputs.dry_run }}" = "true" ]; then
95- DRY_RUN_FLAG="--dry-run"
96- fi
97-
9868 python3 "${{ github.action_path }}/scripts/wiki_sync.py" \
99- --source-dir "${{ inputs.source_path }}" \
100- --docs-dir "wiki-docs" \
101- --config "${{ inputs.config_path }}" \
69+ --github-app-id "${{ inputs.github_app_id }}" \
70+ --github-app-private-key "${{ inputs.github_app_private_key }}" \
71+ --docs-repository-owner "${{ inputs.docs_repository_owner }}" \
72+ --docs-repository "${{ inputs.docs_repository }}" \
73+ --docs-branch "${{ inputs.docs_branch }}" \
10274 --before-sha "${{ inputs.before_sha }}" \
103- --after-sha "${{ inputs.after_sha != '' && inputs.after_sha || github.sha }}" \
75+ --after-sha "${{ inputs.after_sha }}" \
76+ --source-path "${{ inputs.source_path }}" \
77+ --config-path "${{ inputs.config_path }}" \
10478 --litellm-base-url "${{ inputs.litellm_base_url }}" \
105- --dispatch-owner "${{ inputs.docs_repository_owner }}" \
106- --dispatch-repo "${{ inputs.docs_repository }}" \
107- --docs-branch "${{ inputs.docs_branch }}" \
108- $DRY_RUN_FLAG
79+ --litellm-api-key "${{ inputs.litellm_api_key }}" \
80+ --dry-run "${{ inputs.dry_run }}"
0 commit comments