Skip to content

Commit c7078eb

Browse files
committed
Fix cache maybe
1 parent cb89f35 commit c7078eb

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/pending-changes.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,18 @@ jobs:
1313
- name: Install dependencies
1414
run: pnpm install --frozen-lockfile --recursive
1515

16-
- name: Install Playwright browsers and dependencies
17-
run: pnpm dlx puppeteer browsers install chrome
16+
- name: Cache Puppeteer browsers
17+
id: puppeteer-cache
18+
uses: actions/cache@v4
19+
with:
20+
path: /home/runner/.cache/puppeteer
21+
key: ${{ runner.os }}-puppeteer-${{ hashFiles('**/pnpm-lock.yaml') }}
22+
restore-keys: |
23+
${{ runner.os }}-puppeteer-
24+
25+
- name: Install Puppeteer browsers and dependencies
26+
if: steps.puppeteer-cache.outputs.cache-hit != 'true'
27+
run: npx puppeteer browsers install chrome
1828

1929
- uses: nickcharlton/diff-check@main
2030
with:

.puppeteerrc.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { join } from "path";
2+
3+
/**
4+
* @type {import("puppeteer").Configuration}
5+
*/
6+
export default {
7+
// Changes the cache location for Puppeteer.
8+
cacheDirectory: join(__dirname, ".cache", "puppeteer")
9+
};

0 commit comments

Comments
 (0)