GitHub Actions based utilities to manage and synchronize products between WooCommerce, WordPress and Algolia.
You must download and activate the Node.js version specified here.
Copy the .env.example
file to .env
and fill in the necessary environment variables.
Clone the project or use it as a template:
gh repo clone gzeta-adv/algolia-woocommerce
# or
git clone https://github.com/gzeta-adv/algolia-woocommerce.git
Activate pnpm using corepack, install the dependencies and build the project:
corepack enable
corepack install
pnpm install
pnpm build
Each action can be run with either:
# In production mode with node
pnpm action <action-name>
# In development mode with tsx
pnpm action:dev <action-name>
Syncs all products and categories between WooCommerce, WordPress and Algolia.
Syncs all categories between WooCommerce and Algolia.
Syncs all menu items between WordPress and Algolia.
Syncs all products between WooCommerce and Algolia.
The sync
workflow is configured to run every 5 minutes, which is the GitHub limit for scheduled workflows.
Every workflow can also be triggered:
-
With a
workflow_dispatch
event via the GitHub interface -
With a
repository_dispatch
event via the GitHub API:curl --request POST \ --url 'https://api.github.com/repos/<repo>/dispatches' \ --header 'authorization: Bearer <GITHUB_ACCESS_TOKEN>' \ --data '{ "event_type": "<workflow-name>" }'