From 8841ec7ef749fb75afb1d2a8450e5df454eec965 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 22 Oct 2024 15:44:27 +0200 Subject: [PATCH] Update example-doc.yml --- .github/workflows/example-doc.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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