Skip to content

Commit bddd21c

Browse files
committed
feat: now pdf is compiling in actions
1 parent 41df006 commit bddd21c

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

.github/workflows/latex.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build LaTeX PDF
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-pdf:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
issues: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Compile LaTeX
21+
uses: xu-cheng/latex-action@v4
22+
with:
23+
root_file: core-design-document.tex
24+
texlive_version: 2025
25+
os: debian
26+
latexmk_use_lualatex: true
27+
28+
- name: Upload PDF artifact
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: core-design-document-pdf
32+
path: core-design-document.pdf
33+
34+
- name: Comment link to PDF on PR
35+
if: ${{ github.event_name == 'pull_request' }}
36+
uses: actions/github-script@v7
37+
with:
38+
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
script: |
40+
const runId = process.env.GITHUB_RUN_ID;
41+
const { owner, repo } = context.repo;
42+
const prNumber = context.issue.number;
43+
const url = `https://github.com/${owner}/${repo}/actions/runs/${runId}`;
44+
45+
const body = [
46+
'Собран PDF для этого PR.',
47+
'',
48+
`→ [Открыть страницу сборки и скачать \`core-design-document-pdf\`](${url})`,
49+
'',
50+
'_Ищи внизу страницы в блоке **Artifacts**._'
51+
].join('\n');
52+
53+
await github.rest.issues.createComment({
54+
owner,
55+
repo,
56+
issue_number: prNumber,
57+
body,
58+
});

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/*
22
*.synctex.gz
3-
.vscode/*
3+
.vscode/*
4+
*.pdf

configuration/macroses/floats.sty

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
% Стандаратная библиотека externalize больше не поддерживается и там нет нужных
1111
% вещей, например поддержки относительных путей
1212
\RequirePackage{memoize}
13-
\mmzset{memo dir=build/}
1413

1514

1615
\input{macroses/utils/floats/images}

0 commit comments

Comments
 (0)