Skip to content

Commit

Permalink
Add GitHub action to build PDFs
Browse files Browse the repository at this point in the history
Adds a LaTeX action to build the files into PDFs.
  • Loading branch information
llewelld committed Oct 27, 2023
1 parent 397f847 commit ec28c42
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pdflatex.yml
Original file line number Diff line number Diff line change
@@ -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='[email protected]' 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

0 comments on commit ec28c42

Please sign in to comment.