Skip to content

Commit

Permalink
Enable compiling example docs with local changs
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt authored and tarleb committed Oct 23, 2024
1 parent c141d11 commit de44627
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/example-doc.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:<tag>
- 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
Expand All @@ -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
Expand Down

0 comments on commit de44627

Please sign in to comment.