From ec28c426a2b7988638f70eda274638dd389538c1 Mon Sep 17 00:00:00 2001 From: David Llewellyn-Jones Date: Fri, 27 Oct 2023 09:31:42 +0100 Subject: [PATCH] Add GitHub action to build PDFs Adds a LaTeX action to build the files into PDFs. --- .github/workflows/pdflatex.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pdflatex.yml diff --git a/.github/workflows/pdflatex.yml b/.github/workflows/pdflatex.yml new file mode 100644 index 0000000..8ee6650 --- /dev/null +++ b/.github/workflows/pdflatex.yml @@ -0,0 +1,32 @@ +name: Build PDFs of the LaTeX +on: + push: + branches-ignore: + - 'gh-action-result/pdf-files' +jobs: + build_latex: + runs-on: ubuntu-latest + steps: + - name: Set up Git repository + uses: actions/checkout@v4 + - name: Compile LaTeX documents + uses: xu-cheng/texlive-action@v2 + with: + scheme: full + run: | + pushd reference + make + popd + - name: Commit to orphan branch + run: | + git checkout --orphan gh-action-result/pdf-files + git rm -rf . + git add reference/all-the-maths-we-know.pdf + git add reference/all-the-rules-we-know.pdf + git -c user.name='GitHub Action' -c user.email='action@github.com' commit -m "Built PDF documents" + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-action-result/pdf-files + force: true