Skip to content

Commit 7af50a5

Browse files
committed
Update CI script
1 parent 9c3f42d commit 7af50a5

File tree

1 file changed

+24
-55
lines changed

1 file changed

+24
-55
lines changed

.github/workflows/main.yml

Lines changed: 24 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,38 @@
1-
# This is a basic workflow to help you get started with Actions
1+
name: Build latest PDF
22

3-
name: CI
4-
5-
# Controls when the workflow will run
63
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
84
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
99
pull_request:
10-
11-
# Allows you to run this workflow manually from the Actions tab
12-
workflow_dispatch:
1310

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+
1515
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
1918
runs-on: ubuntu-latest
20-
21-
# Steps represent a sequence of tasks that will be executed as part of the job
2219
steps:
23-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2420
- name: Set up Git repository
25-
uses: actions/checkout@v2
21+
uses: actions/checkout@v4
2622

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
3925
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
5736
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:
6737
name: FormalLanguageConstrainedReachabilityLectureNotes_latest
6838
path: tex/FormalLanguageConstrainedReachabilityLectureNotes.pdf
69-

0 commit comments

Comments
 (0)