Skip to content

Merge pull request #56 from AAU-Dat/figure #56

Merge pull request #56 from AAU-Dat/figure

Merge pull request #56 from AAU-Dat/figure #56

Workflow file for this run

name: Compile Article PDF
on:
push:
branches:
- 'main'
paths:
- 'report/**'
workflow_dispatch:
permissions:
id-token: write
pages: write
contents: write
jobs:
pdf:
# The type of runner that the job will run on
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./report/src
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install latexmk
run: |
sudo apt-get update
sudo apt-get install -y latexmk texlive-latex-extra texlive-fonts-extra texlive-bibtex-extra texlive-publishers biber
- name: Install Python dependencies on Ubuntu
run: sudo apt-get install -y python3-pygments
- name: Install Pygments
run: |
pip install --upgrade Pygments
pip show pygments
# Runs latex script
- name: Compile LaTeX
run: |
latexmk main.tex -pdf -shell-escape -synctex=1 -interaction=nonstopmode -f
biber main
makeglossaries main
latexmk main.tex -pdf -shell-escape -synctex=1 -interaction=nonstopmode -f
latexmk main.tex -pdf -shell-escape -synctex=1 -interaction=nonstopmode -f
dir
# Save pdf as artifact
- name: Save artifact with build results
uses: actions/upload-artifact@v3
with:
name: docs
path: ./report/src/main.pdf
retention-days: 7
push:
needs: [pdf]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download pdf artifact
uses: actions/download-artifact@v3
with:
name: docs
- name: Push to repo
run: |
git config --global user.name "Maltesius"
git config --global user.email "andersmalta@gmail.com"
git remote set-url origin https://AAU-Dat:${{ secrets.GITHUB_TOKEN }}@github.com/AAU-Dat/P9-ZKP.git
git add /home/runner/work/P9-ZKP/P9-ZKP/
git commit -m "Added by GitHub Action"
git push