bachelor_thesis/.github/workflows/latex.yml

84 lines
3.4 KiB
YAML
Raw Normal View History

2020-03-25 16:33:56 +01:00
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
2020-03-25 17:26:54 +01:00
paths:
- 'latex/**'
2020-06-23 18:17:53 +02:00
- 'talk/**'
2020-04-08 09:42:18 +02:00
- '.github/workflows/latex.yml'
2020-03-25 16:33:56 +01:00
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v1
- name: LaTeX compilation
uses: dante-ev/latex-action@v0.2.0
with:
# The root LaTeX file to be compiled
2020-03-25 17:17:22 +01:00
root_file: document.tex
2020-03-25 16:33:56 +01:00
# The working directory for the latex compiler to be invoked
working_directory: latex
# LaTeX engine to be used
args: -pdflua -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -interaction=nonstopmode --shell-escape
extra_system_packages: python-pygments
2020-04-08 09:45:19 +02:00
- name: Upload the PDF as Artifact
uses: actions/upload-artifact@v1
with:
name: thesis.pdf
path: ./latex/document.pdf
2020-06-23 18:17:53 +02:00
- name: LaTeX compilation Slides
uses: dante-ev/latex-action@v0.2.0
with:
# The root LaTeX file to be compiled
root_file: slides.tex
# The working directory for the latex compiler to be invoked
working_directory: talk
# LaTeX engine to be used
args: -pdflua -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -interaction=nonstopmode --shell-escape
extra_system_packages: python-pygments
- name: Upload the PDF as Artifact
uses: actions/upload-artifact@v1
with:
name: slides.pdf
path: ./talk/slides.pdf
2020-03-25 17:26:54 +01:00
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: rel/${{ github.sha }}
release_name: Release ${{ github.sha }}
2020-06-10 12:16:53 +02:00
draft: false
2020-03-25 17:26:54 +01:00
prerelease: false
2020-03-25 16:41:44 +01:00
- 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 }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./latex/document.pdf
asset_name: thesis.pdf
asset_content_type: application/pdf
2020-06-23 18:17:53 +02:00
- 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 }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./talk/slides.pdf
asset_name: slides.pdf
asset_content_type: application/pdf