-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (54 loc) · 1.6 KB
/
build-publish.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
name: Build
on:
push:
branches:
- main
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
with:
ref: main
- name: Prepare environment
run: |
mkdir -p ./out
- name: Run pdflatex prebiber on main
uses: dante-ev/latex-action@latest
with:
root_file: main.tex
compiler: pdflatex
args: -interaction=nonstopmode -output-directory=./out -shell-escape
- name: Run biber
uses: dante-ev/latex-action@latest
with:
root_file: main.bcf
compiler: biber
args: --input-directory=./out --output-directory=./out
- name: Run pdflatex on main
uses: dante-ev/latex-action@latest
with:
root_file: main.tex
compiler: pdflatex
args: -interaction=nonstopmode -output-directory=./out -shell-escape
- name: Upload pdf to workflow final
if: ${{ always() }}
uses: actions/[email protected]
with:
name: Final_built
path: out
- name: Copy built pdf
run: |
mkdir -p ./compiled
cp ./out/main.pdf ./compiled/main.pdf
- name: Push on master branch
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GH_TOKEN }}
push-branch: 'main'
commit-message: 'publish built pdf to master [skip ci]'
force-add: 'true'
files: compiled/main.pdf
name: Stefano Moia
email: [email protected]