Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
bokshitsky committed Jul 22, 2024
1 parent 459d34c commit 5734b38
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/generate_pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Generate PDF

on:
push:
paths:
- '**/*.tex'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run Docker container to generate PDF
run: ./build.sh
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
10 changes: 9 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
docker run -v "$(pwd)":/usr/src/tex --rm rekka/tectonic tectonic cv.tex
set -e

docker run -v "$(pwd)":/usr/src/tex --rm rekka/tectonic tectonic cv.tex

if [[ `git status --porcelain` ]]; then
git add cv.pdf
git commit -m "generate new pdf"
git push
fi
Binary file removed cv.pdf
Binary file not shown.

0 comments on commit 5734b38

Please sign in to comment.