Using GitHub Actions to handle Publication Events
Franklin has a lightweight integration with GitHub actions that allows you to run a GitHub actions workflow whenever a page or sheet in Franklin has been published or unpublished. As GitHub actions is a powerful runtime for all kinds of integrations, you can use it as a springboard to further integrations, for instance using WebHooks, API calls, or even other GitHub workflows.
- Franklin can send
resource-published
andresource-unpublished
events to your GitHub repository, where they can trigger a GitHub actions workflow - From there, you can perform further processing, apply conditions, call other APIs or workflow steps
- The key starting point is to listen for the
repository_dispatch
event https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch - You can find an example workflow on the Franklin Website https://github.com/adobe/helix-website/blob/main/.github/workflows/log-publish.yml (it sends a notification to Slack)