This repository shows how to deploy PowerSync sync rules to an instance whenever a push to the main branch includes changes to sync-rules.yaml. The included GitHub Actions workflow installs the PowerSync CLI and runs the deployment command automatically.
- A PowerSync instance.
- GitHub repository secrets named:
POWERSYNC_AUTH_TOKENPOWERSYNC_INSTANCE_IDPOWERSYNC_PROJECT_IDPOWERSYNC_ORG_ID
- Sign in to the PowerSync dashboard.
- Generate a personal access token.
- Store the token in your repository secrets as
POWERSYNC_AUTH_TOKEN. - Copy your PowerSync instance ID from the dashboard and store it as
POWERSYNC_INSTANCE_ID. - From the dashboard URL, copy your project ID and organization ID and store them as
POWERSYNC_PROJECT_IDandPOWERSYNC_ORG_ID.
The node/ directory contains a simple Node project that connects to PowerSync, runs SELECT * FROM lists and SELECT * FROM todos, and logs the results. It exists purely as a demo alongside the GitHub Actions workflow.