-
-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (86 loc) · 3.06 KB
/
typeset.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# This is a basic workflow to help you get started with Actions
name: Build LedgerSMB Book
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "1.10", "1.11", "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
BOOK_VERSION: 'dev'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build_latex:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: ledgersmb-book.tex
extra_system_packages: "graphviz"
- name: Upload PDF file
uses: actions/upload-artifact@v4
with:
name: PDF
path: ledgersmb-book.pdf
- name: Deploy to site
uses: easingthemes/ssh-deploy@main
if: ${{ github.repository == 'ehuelsmann/ledgersmb-book' }}
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i"
SOURCE: "ledgersmb-book.pdf"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: "/home/www/vhosts/book.ledgersmb.org/public_html/$BOOK_VERSION/ledgersmb.pdf"
SCRIPT_BEFORE: |
whoami
ls -al
SCRIPT_AFTER: |
whoami
ls -al
echo $RSYNC_STDOUT
build_site:
runs-on: ubuntu-latest
steps:
- name: Install APT dependencies & Perl packages
run: |
sudo apt-get update && sudo apt-get install -y gcc make cpanminus libxslt1-dev libxml-libxml-perl texlive-latex-extra texlive-fonts-recommended
sudo cpanm --notest LaTeXML
- name: Set up Git repository
uses: actions/checkout@v4
- name: Build site
run: ./rebuild-site.sh
- name: Upload split page book site
uses: actions/upload-artifact@v4
with:
name: split-book
path: public_html/split-book
- name: Upload single page book site
uses: actions/upload-artifact@v4
with:
name: full-book
path: public_html/full-book
- name: Deploy to site
uses: easingthemes/ssh-deploy@main
if: ${{ github.repository == 'ehuelsmann/ledgersmb-book' }}
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i"
SOURCE: "public_html/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: "/home/www/vhosts/book.ledgersmb.org/public_html/$BOOK_VERSION/"
SCRIPT_BEFORE: |
whoami
ls -al
SCRIPT_AFTER: |
whoami
ls -al
echo $RSYNC_STDOUT