Build eMoflon::IBeX tutorial #79
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 eMoflon::IBeX tutorial | |
on: | |
push: | |
# Run pipeline for commits on branch 'main' and on 'testing/<stuff>' | |
branches: | |
- master | |
- 'testing/**' | |
- 'feature/**' | |
- 'hotfix/**' | |
# Run pipeline for release tags | |
tags: | |
- 'v*.*.*' | |
schedule: | |
# Weekly builds on Monday morning 4:42 | |
# Github doc: | |
# "The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs. | |
# High load times include the start of every hour. | |
# To decrease the chance of delay, schedule your workflow to run at a different time of the hour." | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
- cron: '42 4 * * 1' | |
jobs: | |
# Build tutorial PDF | |
build-pdf: | |
runs-on: [ubuntu-22.04] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Docker setup | |
run: | | |
docker pull maxkratz/texlive:latest | |
- name: LaTeX compile | |
run: | | |
echo "Starting LuaLaTeX compiling" | |
cd tutorial-doc | |
docker run --rm -v $PWD:/data maxkratz/texlive:latest latexmk -pdflua -interaction=nonstopmode | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: emoflon-tutorial | |
path: | | |
tutorial-doc/emoflon-tutorial.pdf | |
tutorial-doc/emoflon-tutorial.log | |
create-release: | |
needs: [build-pdf] | |
runs-on: [ubuntu-22.04] | |
# Only run on pushed tags (and explicitely ignore scheduled runs) | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.event_name != 'schedule' | |
steps: | |
- name: Collect artifacts | |
uses: actions/download-artifact@master | |
- name: Release eMoflon::IBeX tutorial | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
emoflon-tutorial/emoflon-tutorial.pdf |