This adds a workflow that renders and releases PDFs for any course with changes. Fixes #69.
The workflow contains 2 jobs:
check-changes: A job to find out which courses have changed. This is near identical to the render-deploy.yaml workflow, the difference being that the output (changed courses) is provided as a matrix.
build-and-release-pdf: This job does what the name implies. As it uses the matrix strategy, it is executed in parallel for every changed course (i.e. we get a run for every changed course). In a bit more detail:
It builds the pdf with the render_to_pdf.sh script.
It makes a release, tags it with the course code, and includes the PDF as an asset.
If a course already has a release, only the asset is replaced with the new PDF. Otherwise the release stays unchanged.
The link pointing to a PDF of a course stays the same, for example: <repo-address>/releases/download/GR001/GR001.pdf will keep pointing to an updated PDF.
Note
So far I've developed this in a private test repo to not generate a large number of release notifications / email spam to everyone. While everything seems (to me) to be working, should we still test this somewhere else before merging here?
This adds a workflow that renders and releases PDFs for any course with changes. Fixes #69.
The workflow contains 2 jobs:
check-changes
: A job to find out which courses have changed. This is near identical to therender-deploy.yaml
workflow, the difference being that the output (changed courses) is provided as a matrix.build-and-release-pdf
: This job does what the name implies. As it uses the matrix strategy, it is executed in parallel for every changed course (i.e. we get a run for every changed course). In a bit more detail:render_to_pdf.sh
script.<repo-address>/releases/download/GR001/GR001.pdf
will keep pointing to an updated PDF.Note
So far I've developed this in a private test repo to not generate a large number of release notifications / email spam to everyone. While everything seems (to me) to be working, should we still test this somewhere else before merging here?