OpenFn / docs

The documentation site and knowledge base for OpenFn, the leading DPG for workflow automation.
https://docs.openfn.org
15 stars 13 forks source link

Adding a repository dispatch event to apollo repository for docker build. #520

Open SatyamMattoo opened 1 month ago

SatyamMattoo commented 1 month ago

Issue

Whenever changes are pushed to the main branch of the docs repo, we need to rebuild the docker image (for the apollo repo) in order to seed the database with the updated docs. This issue needs to be looked into after PR is merged.

Implementation

To achieve this, we can add a step to the already existing workflow to trigger a dispatch event for the apollo repo to re-build the docker image.

We can either do it using the peter-evans/repository-dispatch@v2 or a

curl -X POST -H "Accept: application/vnd.github.v3+json" \
          -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
          https://api.github.com/repos/OpenFn/apollo/dispatches \
          -d '{"event_type":"docs-updated"}