Skip to content

Commit

Permalink
align github actions with github.com:michaelroland/jku-templates-repo…
Browse files Browse the repository at this point in the history
…rt-latex
  • Loading branch information
michaelroland committed Aug 1, 2023
1 parent 61b92d2 commit 301c8a9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 22 deletions.
26 changes: 26 additions & 0 deletions .github/actions/latexmk-and-output/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Build with latexmk and upload artifacts'
description: 'Build LaTeX source with latexmk and upload artifacts'
inputs:
job_engine:
description: 'LaTeX engine to be used for this job'
default: 'pdf'
job_source:
description: 'Input file name for this build job'
default: 'main'
job_artifact_suffix:
description: 'Output filename suffix for this build job'
default: ''
runs:
using: 'composite'
steps:
- uses: ./.github/actions/latexmk
with:
job_engine: ${{ inputs.job_engine }}
job_source: ${{ inputs.job_source }}
job_artifact_suffix: ${{ inputs.job_artifact_suffix }}
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.job_source }}${{ inputs.job_artifact_suffix }}
path: |
${{ inputs.job_source }}${{ inputs.job_artifact_suffix }}.pdf
${{ inputs.job_source }}${{ inputs.job_artifact_suffix }}.log
19 changes: 19 additions & 0 deletions .github/actions/latexmk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Build with latexmk'
description: 'Build LaTeX source with latexmk'
inputs:
job_engine:
description: 'LaTeX engine to be used for this job'
default: 'pdf'
job_source:
description: 'Input file name for this build job'
default: 'main'
job_artifact_suffix:
description: 'Output filename suffix for this build job'
default: ''
runs:
using: docker
image: docker://texlive/texlive:latest
entrypoint: '/bin/bash'
args:
- '-c'
- latexmk -${{ inputs.job_engine }} -bibtex -gg -jobname=%A${{ inputs.job_artifact_suffix }} ${{ inputs.job_source }}.tex
32 changes: 10 additions & 22 deletions .github/workflows/test-build-latex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,24 @@ env:
jobs:
build-pdflatex:
runs-on: ubuntu-latest
container: texlive/texlive:latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Build pdfLaTeX
run: |
latexmk -pdf -bibtex -gg -jobname=%A-pdflatex $SOURCE_NAME.tex
- uses: actions/upload-artifact@v2
- uses: ./.github/actions/latexmk-and-output
with:
name: ${{ env.SOURCE_NAME }}-pdflatex
path: |
${{ env.SOURCE_NAME }}-pdflatex.pdf
${{ env.SOURCE_NAME }}-pdflatex.log
job_engine: pdf
job_source: ${{ env.SOURCE_NAME }}
job_artifact_suffix: -pdflatex

build-xelatex:
runs-on: ubuntu-latest
container: texlive/texlive:latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Build XeLaTeX
run: |
latexmk -pdfxe -bibtex -gg -jobname=%A-xelatex $SOURCE_NAME.tex
- uses: actions/upload-artifact@v2
- uses: ./.github/actions/latexmk-and-output
with:
name: ${{ env.SOURCE_NAME }}-xelatex
path: |
${{ env.SOURCE_NAME }}-xelatex.pdf
${{ env.SOURCE_NAME }}-xelatex.log
job_engine: pdfxe
job_source: ${{ env.SOURCE_NAME }}
job_artifact_suffix: -xelatex

0 comments on commit 301c8a9

Please sign in to comment.