-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (40 loc) · 1.3 KB
/
compile.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
name: Build LaTeX and deploy on GitHub Releases
on:
push:
schedule:
- cron: '0 0 1 * *'
jobs:
Build-LaTeX:
runs-on: ubuntu-24.04
steps:
- name: Make ImageMagik permissive
run: sudo sed -i 's/rights=".*"/rights="all"/' /etc/ImageMagick-6/policy.xml
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
shell: bash
run: git fetch --tags -f
- name: Install TeXLive
uses: DanySK/setup-texlive-action@master
- name: Compile LaTeX
uses: DanySK/compile-latex-action@master
- name: Autotag
uses: DanySK/semver-autotag-action@master
- name: Install hub
run: |
sudo apt-get install -y hub
- name: Deploy
if: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG=$(git describe --tags --exact-match HEAD)
hub release create -m "$(git tag -l --format='%(contents)' "$TAG")" "$TAG" || true
while IFS= read -r file; do
pdf="${file%.*}.pdf"
echo "Delivering file $pdf"
gh release upload "$TAG" "$pdf" --clobber
done <"success-list"