-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.44 KB
/
generate_pdf.yml
File metadata and controls
54 lines (44 loc) · 1.44 KB
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: Generate PDF
on:
push:
branches:
- gh-pages # Replace with your default branch if different
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Update cache_buster in _config.yml
run: |
chmod +x update_version.sh
./update_version.sh
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install pdflatex
run: |
sudo apt-get update
sudo apt-get install -y texlive texlive-latex-extra texlive-xetex
- name: Install Pandoc
if: steps.cache-pandoc.outputs.cache-hit != 'true'
run: sudo apt-get install -y pandoc
- name: Install pypandoc
run: |
python -m pip install --upgrade pip
pip install pypandoc
- name: Run PDF generation script
run: python generate_pdf.py
- name: Commit and push PDF
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git pull origin gh-pages
mv -f output.pdf acceleration_monograph_erratas.pdf
mv -f combined.md _monographtypos/combined.md
git add acceleration_monograph_erratas.pdf _monographtypos/combined.md
git commit -m "Update generated PDF"
git push origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}