Skip to content

Commit

Permalink
WORKFLOW: build PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Jan 8, 2024
1 parent e69d244 commit 5f44998
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,40 @@ 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 texlive-full
- name: build PDF
run: make latexpdf
- name: do some trick ;-)
shell: bash
run: |
stat '_build/latex/matematyka.pdf'
mv '_build/latex/matematyka.pdf' ..
rm -rf *
git add .
git config user.name gucio321
git config user.email [email protected]
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

0 comments on commit 5f44998

Please sign in to comment.