Skip to content

readme: add pf button #58

readme: add pf button

readme: add pf button #58

Workflow file for this run

name: Build PDF document
on:
push:
branch:
- master
workflow_dispatch:
jobs:
build-pdf:
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
sudo apt -y install gnuplot
- name: install python3 dependencies
run: |
python3 -m pip install -r requirements.txt
- name: setup texlive
uses: teatimeguest/setup-texlive-action@v3
with:
version: 2024
packages: |
# to list local packages use: tlmgr info --list --data name
scheme-basic
latexmk
cmap
cancel
tex-gyre
fncychap
float
wrapfig
capt-of
framed
babel-polish
fancyvrb
upquote
needspace
tabulary
varwidth
booktabs
parskip
titlesec
etoolbox
makecell
caption
- name: build PDF
run: make latexpdf
- name: extract file name
run: |
# extract filename from conf.py (it is a value of variable 'project' in lowercase)
echo "filename=$(grep project conf.py | gawk '{gsub(/'\''/,"",$3); print tolower($3)}')" >> $GITHUB_ENV
- name: do some trick ;-)
shell: bash
run: |
echo "The file name is $filename"
stat "_build/latex/${filename}.pdf"
mv "_build/latex/${filename}.pdf" ..
rm -rf *
git add .
git config user.name gucio321
git config user.email [email protected]
mv ../${filename}.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
force: true