-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
69 lines (68 loc) · 2.15 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: JCon Paper
description: Compile and generate Paper metadata
inputs:
issue_id:
description: The review issue id for the paper
required: true
repository_url:
description: The repository URL of the submission containing the paper file
required: true
branch:
description: Git branch where the paper is located
required: false
default: ""
outputs:
pdf_path:
description: "Path to the generated PDF file"
value: ${{ steps.compilation-result.outputs.paper_pdf_path }}
crossref_path:
description: "Path to the generated Crossref XML file"
value: ${{ steps.compilation-result.outputs.paper_crossref_path }}
paper_file_path:
description: "Path to the paper's .tex source file"
value: ${{ steps.paper-finder.outputs.paper_file_path }}
runs:
using: "composite"
steps:
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
bundler-cache: true
cache-version: paper-preprocessing
bundler: Gemfile.lock
working-directory: ${{ github.action_path }}
- name: Preprocess paper files
id: paper-finder
shell: bash
env:
ACTION_PATH: ${{ github.action_path }}
ISSUE_ID: ${{ inputs.issue_id }}
REPO_URL: ${{ inputs.repository_url }}
PAPER_BRANCH: ${{ inputs.branch }}
BUNDLE_GEMFILE: ${{ github.action_path }}/Gemfile
run: |
bundle exec ruby ${{ github.action_path }}/preprocess_paper.rb
- name: Generate pdf
uses: xu-cheng/texlive-action@v2
with:
run: |
cd ${{ steps.paper-finder.outputs.paper_dir }}
latexmk -c
latexmk -bibtex -pdf paper.tex
latexmk -c
- name: Generate crossref.xml
uses: docker://pandoc/latex:3.1.1
with:
args: >-
${{ steps.paper-finder.outputs.crossref_args }}
- name: Check results
id: compilation-result
shell: bash
env:
BUNDLE_GEMFILE: ${{ github.action_path }}/Gemfile
run: |
bundle exec ruby ${{ github.action_path }}/check_result.rb ${{ steps.paper-finder.outputs.paper_dir }} pdf,crossref
branding:
icon: file-text
color: blue