Skip to content
Open
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
11 changes: 11 additions & 0 deletions pnpm-install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,14 @@ steps:
with:
github-registry-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_REGISTRY_TOKEN }}
```

## Windows runners

On Windows the action also points `TMP` and `TEMP` at `RUNNER_TEMP` for the rest of the job. The default temp dir lives on a network-backed disk that is several times slower at small-file writes than the runner's local SSD, which matters for anything that unpacks a project or a `node_modules` tree into the temp dir.

If the job installs Playwright browsers, gate `--with-deps` on Linux. On Windows the flag enables the Media Foundation feature, which takes about three minutes and only adds video codecs:

```yaml
- name: Install Playwright browsers
run: pnpm exec playwright install chromium ${{ runner.os == 'Linux' && '--with-deps' || '' }}
```
8 changes: 8 additions & 0 deletions pnpm-install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ runs:
with:
swap-size-gb: 10

# The default Windows temp dir is a network disk, ~5x slower at small files than RUNNER_TEMP (apify/actor-templates#907).
- name: Use the runner's local disk for temp files
if: runner.os == 'Windows'
shell: bash
run: |
echo "TMP=$RUNNER_TEMP" >> "$GITHUB_ENV"
echo "TEMP=$RUNNER_TEMP" >> "$GITHUB_ENV"

- uses: pnpm/action-setup@v6.0.8
name: Install pnpm
with:
Expand Down
Loading