Skip to content

feat: now pdf is compiling in actions #9

feat: now pdf is compiling in actions

feat: now pdf is compiling in actions #9

Workflow file for this run

name: Build LaTeX PDF
on:
pull_request:
branches:
- master
jobs:
build-pdf:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Compile LaTeX
uses: xu-cheng/latex-action@v4
with:
root_file: core-design-document.tex
texlive_version: 2025
os: debian
latexmk_use_lualatex: true
- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: core-design-document-pdf
path: core-design-document.pdf
- name: Comment link to PDF on PR
if: ${{ github.event_name == 'pull_request' }}
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const runId = process.env.GITHUB_RUN_ID;
const { owner, repo } = context.repo;
const prNumber = context.issue.number;
const url = `https://github.com/${owner}/${repo}/actions/runs/${runId}`;
const body = [
'Собран PDF для этого PR.',
'',
`→ [Открыть страницу сборки и скачать \`core-design-document-pdf\`](${url})`,
'',
'_Ищи внизу страницы в блоке **Artifacts**._'
].join('\n');
await github.rest.issues.createComment({
owner,
repo,
issue_number: prNumber,
body,
});