Skip to content

JAMES publication

JAMES publication #14

Workflow file for this run

name: Build LaTeX Document
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v4
with:
root_file: main.tex # Replace with your main .tex file
working_directory: pub/
compiler: latexmk # Or latexmk, xelatex, etc.
- name: Upload PDF artifact
id: upload_pdf
uses: actions/upload-artifact@v4
with:
name: compiled-pdf
path: pub/main.pdf # Replace with the name of your compiled PDF
- name: Comment on PR with artifact link
if: github.event_name == 'pull_request'
env:
RUN_ID: ${{ github.run_id }}
REPO: ${{ github.repository }}
ARTIFACT_URL: ${{ steps.upload_pdf.outputs.artifact-url }}
run: |
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
COMMENT="🔗 [View PDF ($SHORT_SHA)](${ARTIFACT_URL})"
gh pr comment ${{ github.event.pull_request.number }} --body "$COMMENT"
shell: bash
env:

Check failure on line 43 in .github/workflows/latex_build.yaml

View workflow run for this annotation

GitHub Actions / Build LaTeX Document

Invalid workflow file

The workflow is not valid. .github/workflows/latex_build.yaml (Line: 43, Col: 9): 'env' is already defined
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}