diff --git a/.github/workflows/example-doc.yml b/.github/workflows/example-doc.yml index c4c3362..cc99e4c 100644 --- a/.github/workflows/example-doc.yml +++ b/.github/workflows/example-doc.yml @@ -1,13 +1,15 @@ name: Compile example paper on: - # Build any branch + # Build any branch where either the source data or templates changed push: paths: - 'example/*' + - 'data/templates/*' pull_request: paths: - 'example/*' + - 'data/templates/*' # Build, but don't push on pull requests jobs: @@ -19,12 +21,20 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # Build the docker image locally to enable testing + # updates to the templates. This workflow does not + # push new images to dockerhub at all, hence why we + # don't prefix this like openjournals/inara: + - name: Build docker + run: | + docker build -t inara:edgiest . + - name: Build draft PDF run: >- docker run \ --volume "$(pwd):/data" \ --user "$(id -u):$(id -g)" \ - openjournals/inara:latest \ + inara:edgiest \ -o "jats,contextpdf,crossref,preprint,tex,pdf" example/paper.md - name: Upload draft PDF @@ -44,7 +54,7 @@ jobs: docker run \ --volume "$(pwd):/data" \ --user "$(id -u):$(id -g)" \ - openjournals/inara:latest \ + inara:edgiest \ -o "jats,contextpdf,crossref,preprint,tex,pdf" -p example/paper.md - name: Upload production PDF