From de446273e801c29a6e9947e7a8382baca3293aae Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 22 Oct 2024 22:57:46 +0200 Subject: [PATCH] Enable compiling example docs with local changs --- .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