-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (42 loc) · 1.2 KB
/
watch.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
name: Watch
on:
push:
branches-ignore:
- main
pull_request:
jobs:
check-changed:
runs-on: macos-latest
outputs:
modified: ${{ contains(steps.changed-files.outputs.modified_files, 'undergradmath.typ') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check changed files
id: changed-files
uses: tj-actions/changed-files@v41
- name: List all modified files
run: |
echo "List all the files that have been modified: ${{ steps.changed-files.outputs.modified_files }}"
build-pdf:
runs-on: macos-latest
needs: check-changed
if: needs.check-changed.outputs.modified == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Homebrew
run: brew update
- name: Install Typst
run: brew install typst
- name: Install fonts
run: |
brew tap homebrew/cask-fonts
brew install --cask font-twitter-color-emoji
- name: Build PDF
run: typst compile undergradmath.typ
- name: Upload PDF as artifact
uses: actions/upload-artifact@v3
with:
name: Undergradmath
path: undergradmath.pdf