This repository was archived by the owner on Feb 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (34 loc) · 1.48 KB
/
auto-update-index.yml
File metadata and controls
43 lines (34 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Update Search Index
on:
workflow_call: {}
workflow_dispatch: {} # Manual trigger for testing
jobs:
update-index:
name: Update Search Index
# Restrict to home repository and main branch only for security
if: github.repository == 'KemingHe/python-dependency-manager-companion-mcp-server' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write # Required: commit search index updates
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
# Pin 3rd-party action to v6.4.1 commit hash released on 2025-07-18 to prevent supply chain attacks
uses: astral-sh/setup-uv@7edac99f961f18b581bbd960d59d049f04c0002f
with:
version: "latest"
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync
- name: Build search index
run: uv run src/build_index.py
- name: Pull latest changes by previous workflows
run: git pull origin main
- name: Auto commit index changes
# Pin 3rd-party action to v6.0.1 commit hash released on 2025-06-11 to prevent supply chain attacks
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0
with:
commit_message: 'chore(src/index/): rebuild search index from updated documentation'
file_pattern: 'src/index/*'