Skip to content

Commit 798ef2e

Browse files
Update and rename arXiv.yml to build_preprint.yml
1 parent 77485a0 commit 798ef2e

2 files changed

Lines changed: 66 additions & 42 deletions

File tree

.github/workflows/arXiv.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Draft PDF and Preprint Package
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build-paper:
9+
runs-on: ubuntu-latest
10+
name: Build Preprint PDF and Package
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Cache apt packages
17+
uses: awalsh128/cache-apt-pkgs-action@latest
18+
with:
19+
packages: pandoc texlive texlive-latex-extra texlive-fonts-recommended texlive-xetex zip
20+
version: 1.0
21+
22+
- name: Create preprint watermark header
23+
run: |
24+
cat > /tmp/preprint-header.tex << 'EOF'
25+
\usepackage{fancyhdr}
26+
\usepackage{xcolor}
27+
\pagestyle{fancy}
28+
\fancyhf{}
29+
\fancyhead[C]{\textcolor{red}{\textbf{PREPRINT --- NOT PEER REVIEWED}}}
30+
\fancyfoot[C]{\thepage}
31+
\renewcommand{\headrulewidth}{0.4pt}
32+
EOF
33+
34+
- name: Generate PDF and Preprint Package
35+
run: |
36+
cd paper
37+
38+
# 1. Generate preprint PDF with watermark header
39+
pandoc paper.md -o paper.pdf \
40+
--standalone \
41+
--citeproc \
42+
--pdf-engine=xelatex \
43+
--include-in-header=/tmp/preprint-header.tex
44+
45+
# 2. Generate LaTeX source for preprint submission
46+
# --citeproc embeds bibliography directly into the .tex file
47+
pandoc paper.md -o paper.tex \
48+
--standalone \
49+
--citeproc \
50+
--pdf-engine=xelatex
51+
52+
# 3. Create preprint submission ZIP
53+
# Add any figures here, e.g.: figures/fig1.png
54+
zip preprint_submission.zip paper.tex
55+
56+
- name: Upload Preprint PDF Artifact
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: preprint-pdf
60+
path: paper/paper.pdf
61+
62+
- name: Upload Preprint Package Artifact
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: preprint-package
66+
path: paper/preprint_submission.zip

0 commit comments

Comments
 (0)