-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 1.88 KB
/
build_control2.yml
File metadata and controls
71 lines (59 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build and Publish LaTeX Document
on:
push:
branches:
- main
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install LaTeX
run: |
sudo apt-get update
sudo apt-get install -y texlive-latex-base texlive-lang-cyrillic texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-xetex
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
# Если есть зависимости для generate_latex.py, раскомментируйте следующую строку
# pip install -r cw/requirements.txt
- name: Generate LaTeX
working-directory: cw
run: python generate_latex2.py
- name: Compile LaTeX
working-directory: cw
run: |
if [ ! -f output2.tex ]; then
echo "Error: output.tex not found"
exit 1
fi
for i in 1 2 3; do
pdflatex -interaction=nonstopmode output2.tex
done
if [ ! -f output2.pdf ]; then
echo "Error: output.pdf not found"
exit 1
fi
- name: Debug file presence
run: |
ls -la cw
if [ -f cw/output2.pdf ]; then
echo "output2.pdf exists"
else
echo "output2.pdf does not exist"
fi
- name: Prepare distribution folder
run: |
mkdir -p dist
cp cw/output2.pdf dist/control_final.pdf
- name: Publish to GitHub Pages
uses: tsunematsu21/actions-publish-gh-pages@v1.0.2
with:
dir: dist
branch: pages
token: ${{ secrets.ACCESS_TOKEN }}