Merge pull request #26 from r6mez/main #67
This file contains hidden or 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 LaTeX document | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build_latex: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Git repository | |
| uses: actions/checkout@v4 | |
| - name: Install LaTeX | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| texlive-latex-base \ | |
| texlive-latex-recommended \ | |
| texlive-fonts-recommended \ | |
| texlive-latex-extra \ | |
| texlive-fonts-extra \ | |
| texlive-science \ | |
| texlive-pictures \ | |
| make | |
| - name: Build PDF with Makefile | |
| run: make kactl | |
| - name: Check PDF file | |
| run: | | |
| file kactl.pdf | grep -q ' PDF ' | |
| mkdir public | |
| cp kactl.pdf public/ | |
| cp test-session.pdf public/ | |
| - name: Upload PDF artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: compiled-pdfs | |
| path: | | |
| public/kactl.pdf | |
| public/test-session.pdf | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' | |
| uses: crazy-max/ghaction-github-pages@v4 | |
| with: | |
| target_branch: gh-pages | |
| build_dir: public | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |