-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (82 loc) · 2.29 KB
/
Copy pathbuild.yml
File metadata and controls
85 lines (82 loc) · 2.29 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build
on: [push, pull_request]
permissions:
id-token: write
contents: read
pages: write
jobs:
lint-tex:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install chktex
run: |
sudo apt-get update
sudo apt-get install -y chktex texlive-latex-base
- name: Lint TeX files
run: |
find . -type f -name '*.tex' -exec chktex -q {} +
ubuntu-build:
runs-on: ubuntu-latest
needs: lint-tex
steps:
- uses: actions/checkout@v4
- name: Setup environment
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y ninja-build texlive*
- name: Build
run: |
find . -iname '*.tex' -execdir pdflatex -output-directory $GITHUB_WORKSPACE {} \; || exit 1
find . -iname '*.tex' -execdir pdflatex -output-directory $GITHUB_WORKSPACE {} \; || exit 1
- uses: actions/upload-artifact@v4
with:
name: pdf-linux
path: '*.pdf'
- uses: actions/upload-artifact@v4
with:
name: html
path: '*.html'
macos-build:
runs-on: macos-latest
needs: lint-tex
steps:
- uses: actions/checkout@v4
- name: Setup environment
run: |
brew update
brew install --cask mactex
- name: Build
run: |
eval "$(/usr/libexec/path_helper)"
find . -iname '*.tex' -execdir pdflatex -output-directory $GITHUB_WORKSPACE {} \; || exit 1
find . -iname '*.tex' -execdir pdflatex -output-directory $GITHUB_WORKSPACE {} \; || exit 1
- uses: actions/upload-artifact@v4
with:
name: pdf-macos
path: '*.pdf'
deploy-to-github-pages:
needs: ubuntu-build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Download PDF artifact
uses: actions/download-artifact@v4
with:
name: pdf-linux
path: ./slides
- name: Download PDF artifact
uses: actions/download-artifact@v4
with:
name: html
path: ./
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4