From 33fb1b8851565f3ec456f74c6cf17dbbaed66d00 Mon Sep 17 00:00:00 2001 From: gucio321 Date: Mon, 8 Jan 2024 12:29:57 +0100 Subject: [PATCH] WORKFLOW: build PDF --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f00f4a74..ac528ccb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,3 +25,37 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: gh-pages + build-pdf: + needs: build + runs-on: ubuntu-latest + steps: + - name: check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # otherwise, you will failed to push refs to dest repo + - name: install python3 + run: | + sudo apt -y update + sudo apt -y install python3 python3-pip + - name: install python3 dependencies + run: | + python3 -m pip install -r requirements.txt + - name: install latex dependencies + run: | + sudo apt install -y latexmk texlive texlive-fonts-extra + - name: build PDF + run: make latexpdf + - name: do some trick ;-) + run: | + ls + pwd + mv _build/latex/matematyka.pdf .. + git rm -rf * + mv ../matematyka.pdf . + git add . + git commit --amend --no-edit + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: pdf