Skip to content

Commit 46e7965

Browse files
authored
Merge pull request #91 from resizes/fix/wiki-sync-default-repo
fix(wiki-sync): default docs repo to knowledge-base
2 parents 808b00e + 13297e5 commit 46e7965

4 files changed

Lines changed: 18 additions & 46 deletions

File tree

‎.github/wiki-sync.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 1
22

33
docs:
44
owner: resizes
5-
repository: internal-technical-docs
5+
repository: knowledge-base
66
branch: main
77

88
watch:

‎.github/workflows/sync-wiki.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
github_app_id: ${{ vars.RESIZES_AGENTIC_AI_APP_ID }}
3333
github_app_private_key: ${{ secrets.RESIZES_AGENTIC_AI_PRIVATE_KEY }}
3434
docs_repository_owner: resizes
35-
docs_repository: internal-technical-docs
35+
docs_repository: knowledge-base
3636
docs_branch: main
3737
before_sha: ${{ github.event.before || '0000000000000000000000000000000000000000' }}
3838
after_sha: ${{ github.sha }}

‎docs/wiki-sync/example-caller-workflow.resizes.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
github_app_id: ${{ vars.RESIZES_AGENTIC_AI_APP_ID }}
3333
github_app_private_key: ${{ secrets.RESIZES_AGENTIC_AI_PRIVATE_KEY }}
3434
docs_repository_owner: resizes
35-
docs_repository: internal-technical-docs
35+
docs_repository: knowledge-base
3636
docs_branch: main
3737
before_sha: ${{ github.event.before || '0000000000000000000000000000000000000000' }}
3838
after_sha: ${{ github.sha }}

‎wiki-sync/action.yml‎

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "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

44
inputs:
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

Comments
 (0)