Skip to content

Commit fea31d2

Browse files
cache python dependencies between workflow runs
1 parent 6b40e12 commit fea31d2

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/deploy.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,19 @@ jobs:
3535
role-duration-seconds: 1200
3636
role-to-assume: arn:aws:iam::407839483216:role/admin
3737

38+
- name: Set up cache for pip dependencies
39+
uses: actions/cache@v4
40+
with:
41+
path: ~/.cache/pip
42+
key: ${{ runner.os }}-pip-${{ hashFiles('app/requirements.txt') }}
43+
44+
- name: Install Python dependencies
45+
working-directory: ./app
46+
run: pip install -r requirements.txt
47+
3848
- name: Update knowledge_base.json
3949
working-directory: ./app
40-
run: |
41-
pip install -r requirements.txt
42-
python3 get_knowledge_base.py
50+
run: python3 get_knowledge_base.py
4351

4452
- name: Deploy
4553
uses: DefangLabs/[email protected]

0 commit comments

Comments
 (0)