From 116ffffffa8240f137130a2f7454a62363fef908 Mon Sep 17 00:00:00 2001 From: Robin ALEXANDER <64310405+colisee@users.noreply.github.com> Date: Thu, 8 Sep 2022 17:32:10 +0200 Subject: Create build-pdf.yml Initial version --- .github/workflows/build-pdf.yml | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/build-pdf.yml (limited to '.github') diff --git a/.github/workflows/build-pdf.yml b/.github/workflows/build-pdf.yml new file mode 100644 index 0000000..08149eb --- /dev/null +++ b/.github/workflows/build-pdf.yml @@ -0,0 +1,68 @@ +name: build-pdf +on: + push: + branches: + - master + paths-ignore: + - '**build-pdf.yml' + pull_request: + branches: + - master + types: + - closed + paths-ignore: + - '**build-pdf.yml' + workflow_dispatch: + +jobs: + build: + if: github.event.pull_request.merged == true || github.event_name != 'pull_request' + runs-on: ubuntu-latest + steps: + # Checks-out the master branch of this repository + - uses: actions/checkout@v3 + with: + ref: master + path: master + + # Checks-out the gh-pages branch of this repository + - uses: actions/checkout@v3 + with: + ref: gh-pages + path: gh-pages + + # Build vc.tex + - name: build-vc + run: | + echo "%%% This file is generated by Makefile." > vc.tex + echo "%%% Do not edit this file!" >> vc.tex + echo "" >> vc.tex + git log -1 --format="format:\ + \\gdef\\GITAbrHash{%h}\ + \\gdef\\GITAuthorDate{%ad}\ + \\gdef\\GITAuthorName{%an}" >> vc.tex + working-directory: master + + # Build mmbtools.pdf + - name: build-pdf + uses: xu-cheng/latex-action@v2 + with: + working_directory: master + root_file: mmbtools.tex + post_compile: mv mmbtools.pdf ../gh-pages + + # Commit mmbtools.pdf + - name: commit-pdf + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git add -f mmbtools.pdf + git commit -m "generated" + working-directory: gh-pages + + - name: push-pdf + uses: ad-m/github-push-action@master + with: + directory: gh-pages + branch: gh-pages + -- cgit v1.2.3