Fix pdf uploading #7
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*' | |
jobs: | |
build: | |
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: Clean previous build files | |
run: rm -f presentation/*.pdf presentation/*.aux presentation/*.log | |
- 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: Upload PDF artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: beamer-presentation | |
path: presentation/prezentace.pdf | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload release asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: presentation/prezentace.pdf | |
asset_name: prezentace.pdf | |
asset_content_type: application/pdf |