name: Compilation Demo
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
compile:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
# Install Apptainer from PPA (for container support)
sudo add-apt-repository -y ppa:apptainer/ppa 2>/dev/null || true
sudo apt-get update 2>/dev/null || true
sudo apt-get install -y apptainer 2>/dev/null || true
# Always install TeXLive and required tools for native compilation
echo "Installing TeXLive and dependencies for manuscript compilation..."
sudo apt-get install -y texlive-full latexdiff ghostscript imagemagick perl parallel 2>/dev/null || \
echo "Warning: Some dependencies may not be available"
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip install xlsx2csv csv2latex bibtexparser || echo "Warning: Some Python dependencies may not be available"
- name: Run manuscript compilation
run: ./compile.sh manuscript
- name: Upload compiled PDF
uses: actions/upload-artifact@v4
if: success()
with:
name: compiled-manuscript
path: 01_manuscript/manuscript.pdf
retention-days: 30
- name: Upload diff PDF
uses: actions/upload-artifact@v4
if: success()
with:
name: compiled-diff
path: 01_manuscript/manuscript_diff.pdf
retention-days: 30