template update test #8
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 LaTeX | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
make-pdf: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install OS dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y latexmk texlive-luatex texlive-fonts-extra | |
- name: Make PDF | |
run: make | |
- name: Upload PDF as an artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Sample-PDF | |
path: build/*.pdf | |
retention-days: 7 | |
- name: Prepare files for gh-pages deployment | |
if: github.ref == 'refs/heads/main' | |
run: | | |
mkdir build-pdf | |
cp build/*.pdf build-pdf/ | |
- name: Deploy to gh-pages | |
if: github.ref == 'refs/heads/main' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
folder: build-pdf | |
clean: true | |
single-commit: true | |
- name: Display logs | |
if: always() | |
run: | | |
echo "::group:: Terminal output 'console_output.txt'" && cat console_output.txt && echo "::endgroup::" | |
for f in build/*.log; do echo "::group:: Output latex log file $f" && cat $f && echo "::endgroup::" ; done |