Grafex uses a headless WebKit browser under the hood. On macOS and Windows the browser binary ships with all its dependencies, but on Linux — where most CI runners operate — additional system libraries must be installed separately. This guide walks through the exact steps for GitHub Actions and covers caching, alternative engines, and containerized environments.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/andresilva-cc/grafex/llms.txt
Use this file to discover all available pages before exploring further.
GitHub Actions setup
Install Node.js and Grafex
Make sure your workflow includes a Node.js setup step and installs your project dependencies. Grafex’s
postinstall script downloads the WebKit binary automatically.Install WebKit system dependencies
On Linux runners, WebKit requires OS-level libraries (GTK, glib, and others). Install them with Playwright’s
install-deps command. This must run before the browser itself is installed.Install the WebKit browser binary
Download the WebKit binary that Playwright manages. This is the same binary Grafex uses at render time.
Complete GitHub Actions workflow
Below is a ready-to-use workflow file. Copy it into.github/workflows/export.yml and adjust the file paths to match your project.
To cache the WebKit binary between workflow runs, set the Any subsequent Grafex commands in the same job will also pick up
PLAYWRIGHT_BROWSERS_PATH environment variable to a directory inside your workspace and include it in an actions/cache step. This avoids re-downloading the binary on every run, which can save 30–60 seconds depending on runner speed.PLAYWRIGHT_BROWSERS_PATH if it is set in the job environment.PLAYWRIGHT_BROWSERS_PATH
By default, Playwright installs browser binaries to a shared cache directory that may not be writable in all CI environments. SetPLAYWRIGHT_BROWSERS_PATH to any writable path to override the location:
Chromium as an alternative engine
If you encounter WebKit-specific CSS compatibility issues, Grafex also supports Chromium. Install it the same way and pass--browser chromium to the CLI.
Docker and containerized environments
The same dependency installation steps apply inside Docker containers. Add the following to yourDockerfile or container setup script before running Grafex:
PLAYWRIGHT_BROWSERS_PATH to a directory the user owns before running playwright install: