GitHub Action to install worai, install Python Playwright + Chromium, and run:
worai --profile <name> graph sync run [--debug]worai --config <path> --profile <name> graph sync run [--debug]
- Python (
python3orpython) must be available on the runner. profileis required and must exist in the selectedworaiconfig.
| Input | Required | Default | Description |
|---|---|---|---|
profile |
Yes | - | Profile name passed to --profile. Must exist in selected config. |
config_path |
No | '' |
If set, action runs worai --config <path> .... |
debug |
No | false |
When truthy (true/1/yes), appends --debug. |
log_level |
No | warning |
Exports WORAI_LOG_LEVEL as debug, info, warning, or error. |
working_directory |
No | . |
Directory where worai runs. |
worai_version |
No | 6.16.2 |
Exact worai version installed by the action. |
install_playwright |
No | true |
Installs Playwright Python package and browser binaries when truthy (true/1/yes). |
playwright_version |
No | 1.58.0 |
Exact Playwright Python package version installed when Playwright install is enabled. |
playwright_browser |
No | chromium |
Browser passed to python -m playwright install. |
cache_enabled |
No | true |
Enables dependency cache for pip and Playwright browser binaries when truthy (true/1/yes). |
cache_key_suffix |
No | '' |
Optional cache key suffix. When empty, action derives <worai_version>-<playwright_version>-<playwright_browser>. |
- If
config_pathis set, command is:worai --config <path> --profile <name> graph sync run [--debug]
- If
config_pathis not set, command is:worai --profile <name> graph sync run [--debug]
- The action exports
WORAI_LOG_LEVEL=<value>for theworaiprocess. Default iswarning. - The action always passes the root
--profileoption (the recommended form in currentworaidocs forgraph sync run).
Without root --config, standard worai config discovery applies:
WORAI_CONFIG./worai.toml~/.config/worai/config.toml~/.worai.toml
For graph sync run, current worai profile resolution order is:
- root
--profile WORAI_PROFILEdefault
- Supported input sources are managed by
woraiconfig:urls,sitemap_url(+ optionalsitemap_url_pattern), and Google Sheets (sheets_url+sheets_name+oauth.service_account). - Configure exactly one input source mode per run.
oauth.service_accountaccepts inline JSON object content or a file path.- For Google Sheets source,
oauth.service_accountis required and the command fails when:- value is missing or empty
- value is neither valid JSON object content nor an existing file path
- value is valid JSON but not an object
google_search_consolecan be global or profile-level inworai.toml; profile value overrides global value; default isfalsewhen unset; maps to SDK settingGOOGLE_SEARCH_CONSOLE.- The command fails when selected profile does not define
api_key. - By default, the action installs
playwright==1.58.0and Chromium. Setinstall_playwright: falseto skip this step. - By default, cache is enabled for
~/.cache/pipand~/.cache/ms-playwright. - Default cache key format is
<runner.os>-graph-sync-<worai_version>-<playwright_version>-<playwright_browser>. - Set
cache_enabled: falseto disable cache or setcache_key_suffixto control the key suffix directly.
worai references:
- Install & quickstart: https://docs.wordlift.io/worai/install/
- Configuration: https://docs.wordlift.io/worai/configuration/
- Graph command: https://docs.wordlift.io/worai/commands/graph/
name: Sync graph
on:
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: wordlift/graph-sync@v6
with:
profile: productionUse this when worai.toml is in your repository.
name: Sync graph
on:
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: wordlift/graph-sync@v6
with:
profile: production
config_path: ./worai.toml
debug: false
log_level: infoactions/checkoutis required only if your config file is in the repo workspace.actions/setup-pythonis optional on GitHub-hosted runners (Python is usually preinstalled), but recommended if you want a fixed Python version.- When cache is enabled,
actions/cachev5.0.3requires GitHub Actions Runner2.327.1or newer on self-hosted runners. - GitHub-hosted Ubuntu runners typically satisfy Chromium runtime dependencies. On custom/self-hosted runners, install required OS packages before using Playwright.
The graph sync run workflow expects one source mode per profile.
Sitemap source example:
[profiles.acme_sitemap]
api_key = "${WORDLIFT_API_KEY}"
sitemap_url = "https://example.com/sitemap.xml"
ingest_source = "sitemap"
ingest_loader = "web_scrape_api"
ingest_passthrough_when_html = true
web_page_import_timeout = "60s"Google Sheets source example:
[profiles.acme_sheets]
api_key = "${WORDLIFT_API_KEY}"
sheets_url = "https://docs.google.com/spreadsheets/d/ACME_SPREADSHEET_ID"
sheets_name = "URLs"
ingest_source = "sheets"
[profiles.acme_sheets.oauth]
service_account = "${SHEETS_SERVICE_ACCOUNT}"Optional local default profile selection:
export WORAI_PROFILE="acme_sitemap"- Publish immutable releases and move alias tags only by creating new immutable release tags.
- Consumers should pin this action to a full commit SHA for maximum integrity.
- If using tags, use managed aliases:
- major alias (
@v6) tracks latestv6.x.y
- major alias (
- minor alias (
@v6.5) tracks latestv6.5.z - The release workflow force-updates both alias tags on each release tag push.
- This repository includes automated release workflow
.github/workflows/release.ymltriggered by pushing tags likev6.0.0. - Marketplace publication itself is still a manual GitHub UI step; the release workflow adds a summary with a direct release link and checklist.
- Versioning strategy and compatibility policy are documented in
VERSIONING.md.
- Replace
uses: wordlift/graph-sync@v1withuses: wordlift/graph-sync@v6. - Action
v6defaults to installingworai6.16.2.
Run tests locally:
./tests/run-worai.sh
./tests/install-worai.sh
./tests/install-playwright.sh
./tests/resolve-cache-key.sh