-
Notifications
You must be signed in to change notification settings - Fork 13
46 lines (44 loc) · 1.56 KB
/
tex-alt.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
name: build
on:
push:
branches: [master]
pull_request:
types: [assigned]
jobs:
build:
runs-on: ubuntu-latest
container: texlive/texlive
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Apt update
run: apt-get update
- name: Install misc packages
run: apt-get install -y fonts-inconsolata inkscape
- name: Install jetbrains mono
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/install_manual.sh)"
- name: Remove variable width font
run: rm /github/home/.local/share/fonts/fonts/variable/JetBrainsMono[wght].ttf /github/home/.local/share/fonts/fonts/variable/JetBrainsMono-Italic[wght].ttf
- name: Run build
run: bash build.sh
- name: Set env
run: echo "COMMIT_MSG=Built pdfs $(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV
- name: Remove anything but pdfs
run: |
shopt -s globstar
shopt -s extglob
rm **/*.!(pdf) || true
rm -rf `find -type d -name svg-inkscape` || true
rm -rf `find -type d -name images` || true
shell: "bash"
- name: Commit changes
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: pdfs
publish_dir: .
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
full_commit_message: ${{ env.COMMIT_MSG }}
keep_files: true