-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (70 loc) · 2.33 KB
/
build_pdf_manual.yaml
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
name: Build PDF Manual
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build-pdf:
runs-on: ubuntu-latest
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_TOKEN: ${{ secrets.AUTOMATISATION }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Install linux libraries
run: |
sudo apt-get update
sudo apt-get install -y libsodium-dev \
libcurl4-openssl-dev \
libgdal-dev \
libproj-dev \
libudunits2-dev \
libharfbuzz-dev \
libfribidi-dev
- name: Install R dependencies
run: |
R -e "install.packages('devtools')"
R -e "install.packages('roxygen2')"
- name: Install minimal LaTeX
run: |
sudo apt-get install -y texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
texinfo
- name: Install R packages
run: |
source("preprocessing/install_imports.R")
shell: Rscript {0}
- name: cleanup_reference_manual
run: |
source("preprocessing/cleanup_reference_manual.R")
shell: Rscript {0}
- name: Build and document package
run: |
R -e "devtools::document()"
- name: Check for viewers and remove
run: |
sudo apt-get remove -y xdg-utils || true
- name: Generate PDF manual
run: |
R CMD Rd2pdf . -o fistools.pdf || { echo "Failed to generate PDF"; exit 1; }
- name: List temp files for debugging
if: failure()
run: |
ls -la /tmp
ls -la $HOME
ls -la /home/runner/work/${{ github.repository }}/
cat /home/runner/work/${{ github.repository }}/fistools.pdf.log || true
cat /home/runner/work/${{ github.repository }}/*.log || true
- name: Commit and push changes
if: success()
uses: devops-infra/action-commit-push@master
with:
github_token: ${{ secrets.AUTOMATISATION }}
commit_prefix: "[AUTO]"
commit_message: "update fistools"