Create code pngs #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Beamer Presentation | |
on: | |
push: | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
compile-latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Install minimal TeX Live packages | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y \ | |
texlive-latex-base \ | |
texlive-latex-recommended \ | |
texlive-fonts-recommended \ | |
texlive-latex-extra \ | |
texlive-lang-czechslovak | |
- name: Compile Beamer Presentation | |
run: | | |
pdflatex -file-line-error -output-directory=presentation presentation/prezentace.tex | |
pdflatex -file-line-error -output-directory=presentation presentation/prezentace.tex | |
- name: Create artifacts | |
uses: actions/upload-artifact@v4 | |
id: artifacts | |
with: | |
name: prezentace | |
path: presentation/prezentace.pdf | |
- name: Comment on PR | |
uses: thollander/actions-comment-pull-request@v3 | |
with: | |
message: "Presentation compiled successfully. You can download it here [prezentace.pdf](${{ steps.artifacts.outputs.artifact_url }})." | |
if: github.event_name == 'pull_request' | |
create-release: | |
runs-on: ubuntu-latest | |
needs: compile-latex | |
if: github.ref == 'refs/tags/v*' | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: prezentace | |
- name: Create release with compiled presentation (tag push only) | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: prezentace.pdf |