Skip to content

Commit 6ecff37

Browse files
hankhsu1996claude
andcommitted
Cache strategy JSON files in CI to speed up UI-only builds
- Add cache step using hash of Python source files - Skip JSON generation when cache hit (Python unchanged) - UI changes now deploy faster without regenerating strategies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 110293d commit 6ecff37

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@ jobs:
3131
cache: "npm"
3232
cache-dependency-path: web/package-lock.json
3333

34+
- name: Cache strategy JSON files
35+
id: cache-strategies
36+
uses: actions/cache@v4
37+
with:
38+
path: web/public/strategies
39+
key: strategies-${{ hashFiles('src/blackjack/**/*.py', 'scripts/generate_strategies.py', 'pyproject.toml', 'uv.lock') }}
40+
3441
- name: Generate strategy JSON files
42+
if: steps.cache-strategies.outputs.cache-hit != 'true'
3543
run: uv run python -m scripts.generate_strategies
3644

3745
- name: Install npm dependencies

0 commit comments

Comments
 (0)