Files
unibo-ai-notes/.github/workflows/compile.yml
2023-11-17 11:28:48 +01:00

54 lines
1.2 KiB
YAML

name: Compile LaTeX
on:
push:
branches:
- main
paths: ["src/**", .github/workflows/**]
jobs:
compile:
name: Compile notes
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install LaTeX
run: |
sudo apt update
sudo apt install -y latexmk texlive texlive-science texlive-latex-extra
- name: Checkout old pdfs
uses: actions/checkout@v3
with:
ref: pdfs
path: .compiled
- name: Copy basic files to pdfs branch
run: |
cp README.md .compiled
cp LICENSE .compiled
- name: Compile
run: |
export LANG="en_GB.UTF-8"
export LC_ALL="en_GB.UTF-8"
bash ./compile.sh .compiled
- name: Move to pdfs branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: pdfs
FOLDER: .compiled
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_NAME: "github-actions[bot]"
COMMIT_EMAIL: "github-actions[bot]@users.noreply.github.com"
MESSAGE: "🤖 Hello human, doing my things ({sha})"