|
1 |
| -# This is a basic workflow to help you get started with Actions |
| 1 | +name: Build latest PDF |
2 | 2 |
|
3 |
| -name: CI |
4 |
| - |
5 |
| -# Controls when the workflow will run |
6 | 3 | on:
|
7 |
| - # Triggers the workflow on push or pull request events but only for the main branch |
8 | 4 | push:
|
| 5 | + branches: |
| 6 | + # PRs can only use caches from their target branch. We therefore need to |
| 7 | + # make sure we run on 'main' too. |
| 8 | + - main |
9 | 9 | pull_request:
|
10 |
| - |
11 |
| - # Allows you to run this workflow manually from the Actions tab |
12 |
| - workflow_dispatch: |
13 | 10 |
|
14 |
| -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
15 | 15 | jobs:
|
16 |
| - # This workflow contains a single job called "build" |
17 |
| - build: |
18 |
| - # The type of runner that the job will run on |
| 16 | + style: |
| 17 | + name: Build latest PDF |
19 | 18 | runs-on: ubuntu-latest
|
20 |
| - |
21 |
| - # Steps represent a sequence of tasks that will be executed as part of the job |
22 | 19 | steps:
|
23 |
| - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
24 | 20 | - name: Set up Git repository
|
25 |
| - uses: actions/checkout@v2 |
| 21 | + uses: actions/checkout@v4 |
26 | 22 |
|
27 |
| - # First run of pdflatex. |
28 |
| - - name: First pdflatex FormalLanguageConstrainedReachabilityLectureNotes |
29 |
| - uses: dante-ev/latex-action@latest |
30 |
| - with: |
31 |
| - working_directory: tex |
32 |
| - root_file: FormalLanguageConstrainedReachabilityLectureNotes.tex |
33 |
| - compiler: pdflatex |
34 |
| - args: -interaction=nonstopmode -shell-escape |
35 |
| - |
36 |
| - # Bibliography generation |
37 |
| - - name: bibtex FormalLanguageConstrainedReachabilityLectureNotes |
38 |
| - uses: dante-ev/latex-action@latest |
| 23 | + - name: Compile LaTeX document |
| 24 | + uses: xu-cheng/latex-action@v3 |
39 | 25 | with:
|
40 |
| - working_directory: tex |
41 |
| - root_file: FormalLanguageConstrainedReachabilityLectureNotes.aux |
42 |
| - compiler: bibtex |
43 |
| - args: |
44 |
| - |
45 |
| - # Second compilation |
46 |
| - - name: Second pdflatex FormalLanguageConstrainedReachabilityLectureNotes |
47 |
| - uses: dante-ev/latex-action@latest |
48 |
| - with: |
49 |
| - working_directory: tex |
50 |
| - root_file: FormalLanguageConstrainedReachabilityLectureNotes.tex |
51 |
| - compiler: pdflatex |
52 |
| - args: -interaction=nonstopmode -shell-escape |
53 |
| - |
54 |
| - # Final compilation |
55 |
| - - name: Final pdflatex FormalLanguageConstrainedReachabilityLectureNotes |
56 |
| - uses: dante-ev/latex-action@latest |
| 26 | + root_file: tex/main.tex |
| 27 | + work_in_root_file_dir: true |
| 28 | + latexmk_use_lualatex: true |
| 29 | + |
| 30 | + - name: Rename PDF |
| 31 | + run: | |
| 32 | + mv tex/main.pdf tex/FormalLanguageConstrainedReachabilityLectureNotes.pdf |
| 33 | +
|
| 34 | + - name: Upload PDF file |
| 35 | + uses: actions/upload-artifact@v4 |
57 | 36 | with:
|
58 |
| - working_directory: tex |
59 |
| - root_file: FormalLanguageConstrainedReachabilityLectureNotes.tex |
60 |
| - compiler: pdflatex |
61 |
| - args: -interaction=nonstopmode -shell-escape |
62 |
| - |
63 |
| - # Publish compiled pdf |
64 |
| - - name: Upload |
65 |
| - uses: actions/upload-artifact@v2 |
66 |
| - with: |
67 | 37 | name: FormalLanguageConstrainedReachabilityLectureNotes_latest
|
68 | 38 | path: tex/FormalLanguageConstrainedReachabilityLectureNotes.pdf
|
69 |
| - |
0 commit comments