-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (44 loc) · 1.5 KB
/
latex.yaml
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
name: Build and publish LaTeX
on:
push:
branches:
- "main"
jobs:
build-and-publish:
strategy:
matrix:
files:
[
{
tex_file: "bachelor-2/semester-4/analysis/main.tex",
pdf_file: "bachelor-2/semester-4/analysis/main.pdf",
upload_name: "analysis-4.pdf",
},
{
tex_file: "bachelor-2/semester-4/mathematical-logic/main.tex",
pdf_file: "bachelor-2/semester-4/mathematical-logic/main.pdf",
upload_name: "mathematical-logic-4.pdf",
},
]
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: ${{ matrix.files.tex_file }}
work_in_root_file_dir: true
latexmk_use_lualatex: true
- name: Make symlink
run: ln -s ${{ matrix.files.pdf_file }} ${{ matrix.files.upload_name }}
- name: Upload PDF
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --exclude '*' --include ${{ matrix.files.upload_name }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.YA_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.YA_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET: ${{ secrets.YA_S3_BUCKET }}
AWS_REGION: "ru-central1"
AWS_S3_ENDPOINT: "https://storage.yandexcloud.net"