diff --git a/.github/workflows/generate_pdf.yml b/.github/workflows/generate_pdf.yml new file mode 100644 index 0000000..dbcf3ed --- /dev/null +++ b/.github/workflows/generate_pdf.yml @@ -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 }} diff --git a/build.sh b/build.sh index 82dd753..0fa897a 100755 --- a/build.sh +++ b/build.sh @@ -1 +1,11 @@ -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 config user.email "bokshitsy@gmail.com" + git config user.name "Evgeny Bokshitsky" + git add cv.pdf + git commit -m "generate new pdf" + git push +fi diff --git a/cv.pdf b/cv.pdf deleted file mode 100644 index ac98567..0000000 Binary files a/cv.pdf and /dev/null differ