-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (47 loc) · 1.54 KB
/
pdf.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
47
48
49
50
51
52
53
54
55
56
57
# While this action's image (https://github.com/xu-cheng/texlive-action,
# ghcr.io/xu-cheng/texlive-full:latest) is "only" 2 GiB, as opposed to
# texlive/texlive with a whopping 4 GiB (!!), it already fails when "apk add
# make". Also using the image as is instead of the "action" (which just
# shell-execs the string below "run" :)) fails when pulling it from ghcr.io. So
# 4 GiB it is, then.
##jobs:
## pdf:
## runs-on: ubuntu-latest
##
## steps:
## - name: checkout
## uses: actions/checkout@v2
##
## - name: build
## uses: xu-cheng/texlive-action/full@master
## with:
## run: |
## apk update && apk add make && sh .github/scripts/build_pdf.sh built_pdfs
name: Build and release PDF
on: push
jobs:
pdf:
runs-on: ubuntu-latest
container:
image: texlive/texlive
steps:
- name: checkout
uses: actions/checkout@v2
- name: build
run: |
sh .github/scripts/build_pdf.sh built_pdfs
# Upload artifact for each CI run. Not needed for release_if_tag! This
# uses the output of steps.build .
- name: upload artifact
uses: actions/upload-artifact@master
with:
name: built_pdfs
path: built_pdfs
# Create a release and attach built_pdfs/*.pdf to that for easy download.
- name: release_if_tag
uses: softprops/action-gh-release@master
if: startsWith(github.ref, 'refs/tags/')
with:
files: "built_pdfs/*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}