Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ jobs:
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Enable Puppeteer cache
uses: actions/cache@v4
with:
path: .cache/puppeteer
key: puppeteer-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Enable pnpm cache
uses: actions/cache@v4
with:
Expand All @@ -62,10 +68,10 @@ jobs:
run: |
pnpm install

# XXX: Workaround for Puppeteer issues
- name: Install Chromium for Puppeteer
run: |
node ./packages/docs-builder/node_modules/puppeteer/install.js
# Note: This will be a no-op if Chromium was already saved to the Puppeteer cache
pnpm dlx puppeteer browsers install

- name: Build
id: build
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ jobs:
# restore-keys: |
# pnpm-store-${{ runner.os }}-

- name: Enable Puppeteer cache
uses: actions/cache@v4
with:
path: .cache/puppeteer
key: puppeteer-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}

# Save the auth token so that the build can access private packages from
# (and publish packages to) the GitHub Packages registry
- name: Configure npm auth tokens
Expand All @@ -68,10 +74,10 @@ jobs:
run: |
pnpm install

# XXX: Workaround for Puppeteer issues
- name: Install Chromium for Puppeteer
run: |
node ./packages/docs-builder/node_modules/puppeteer/install.js
# Note: This will be a no-op if Chromium was already saved to the Puppeteer cache
pnpm dlx puppeteer browsers install

- name: Build
id: build
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.cache
.claude/**/*.local.json
node_modules
9 changes: 9 additions & 0 deletions .puppeteerrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { join } = require('path')

/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
// Use a local cache directory to make it easier to persist the cache in GitHub Actions
cacheDirectory: join(__dirname, '.cache', 'puppeteer')
}
2 changes: 1 addition & 1 deletion packages/docs-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"marked": "^4.0.10",
"postcss": "^8.5.6",
"postcss-rtlcss": "^5.7.1",
"puppeteer": "^18.2.1",
"puppeteer": "^24.0.0",
"rev-hash": "^3.0.0",
"semver-compare": "^1.0.0",
"tinyglobby": "^0.2.15"
Expand Down
Loading