Skip to content

Commit f14e0f3

Browse files
authored
ci: prime cache for semantic content indexing (#659)
1 parent b2b9f2f commit f14e0f3

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/index-semantic-content.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,27 @@ jobs:
3434
- name: 📥 Download deps
3535
uses: bahmutov/npm-install@v1.11.2
3636

37+
- name: 🏄 Copy test env vars
38+
run: cp .env.example .env
39+
40+
- name: 🏦 Prime Site Cache
41+
id: site-cache
42+
uses: actions/cache@v5
43+
with:
44+
path: other/cache.db
45+
key: site-cache
46+
47+
- name: 🏗 Build (production)
48+
if: steps.site-cache.outputs.cache-hit != 'true'
49+
run: npm run build
50+
51+
- name: 😅 Generate Site Cache
52+
if: steps.site-cache.outputs.cache-hit != 'true'
53+
run: npm run prime-cache:mocks
54+
3755
- name: 🔎 Index changed content
3856
run: |
3957
set -euo pipefail
40-
cp .env.example .env
4158
node --env-file=.env other/semantic-search/index-repo-content.ts --before "${{ github.event.before }}" --after "${{ github.sha }}"
4259
env:
4360
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

0 commit comments

Comments
 (0)