This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
readme-adoc: add abstract to readme #107
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build LaTeX document & push PDF | |
permissions: | |
contents: write | |
on: [push] | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v3 | |
with: | |
working_directory: src | |
root_file: main.tex | |
latexmk_use_xelatex: true | |
latexmk_shell_escape: true | |
extra_system_packages: "font-liberation" | |
# Store the PDF in the root of the repository | |
- name: Move PDF to root | |
run: mv src/main.pdf main.pdf | |
# Commit the PDF back to the repository | |
- name: Commit PDF | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add main.pdf | |
git commit -m "CI: add compiled PDF" || echo "No changes to commit" | |
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:${{ github.ref_name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |