-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.55 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: LaTeX test
on: [pull_request, workflow_dispatch, push]
jobs:
spelling:
name: Check spelling
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Install hunspell
run: sudo apt-get -y install hunspell hunspell-en-gb
- name: Spell Check
shell: bash --noprofile --norc -eo pipefail -o nounset {0}
run: bash cicd/spelling.sh
build_pdf:
name: Create PDF
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Get Current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Get Githash
id: git_hash
run: echo "::set-output name=git_hash::$(git rev-parse --short "$GITHUB_SHA")"
- name: Get Git Branch
id: git_branch
run: echo "::set-output name=git_branch::${GITHUB_REF#refs/heads/}"
- name: Set Version in Document if allowed
if: ${{ contains(github.event.head_commit.message, '@@version@@') }}
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "@@version@@"
replace: "${{ steps.date.outputs.date }}-${{ steps.git_branch.outputs.git_branch }}-${{ steps.git_hash.outputs.git_hash }}"
regex: false
- name: Compile LaTeX Document
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
- name: Upload Artefact
uses: actions/upload-artifact@v4
with:
name: main.pdf
path: ./main.pdf