Skip to content

Commit

Permalink
Add new workflow for compiling report and adding it to repository (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Runge authored Sep 28, 2024
1 parent a4c8561 commit d8ec0b8
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/compile-pdf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Compile PDF
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 3"

jobs:
compile-pdf:
name: Compile PDF with texlive image
runs-on: ubuntu-latest
container:
image: texlive/texlive:latest
defaults:
run:
working-directory: ./report/src
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Compile pdf
run: |
pdflatex -file-line-error -interaction=nonstopmode -synctex=0 -output-format=pdf -shell-escape main.tex
biber main
makeglossaries main
pdflatex -file-line-error -interaction=nonstopmode -synctex=0 -output-format=pdf -shell-escape main.tex
pdflatex -file-line-error -interaction=nonstopmode -synctex=0 -output-format=pdf -shell-escape main.tex
- name: Upload pdf artifact
uses: actions/upload-artifact@v4
with:
name: report
path: ./report/src/main.pdf
retention-days: 5

push-to-repository:
name: Push PDF to repository in the docs folder
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download PDF
uses: actions/download-artifact@v4
with:
name: report
path: ./docs
- name: Push to repository
run: |
git add ./docs
git commit -m "Added by compile-pdf GitHub Action"
git push
# deploy:
# needs: compile-pdf
# name: Deploy pdf to GitHub Pages
# runs-on: ubuntu-latest
# steps:
# - name: Deploy to GitHub Pages
# uses: actions/

0 comments on commit d8ec0b8

Please sign in to comment.