-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (51 loc) · 1.56 KB
/
build-ss3-manual-html.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
name: build html version of the ss3 user manual
on:
push:
paths:
- '**.tex'
- 'html_usermanual_snippets.html'
- '**.yml'
pull_request:
paths:
- '**.tex'
- 'html_usermanual_snippets.html'
- '**.yml'
workflow_call:
inputs:
ref:
default: ${{ github.ref }}
required: false
type: string
jobs:
build-html:
runs-on: ubuntu-latest
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
steps:
- name: Set up Git repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Update Ubuntu packages
run: sudo apt-get update
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- name: setup pandoc
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.14.0.3'
- name: Convert tex to html
run: pandoc SS330_User_Manual.tex -s -o SS330_User_Manual.html --toc --self-contained --mathjax --default-image-extension=png --number-sections --citeproc --variable linkcolor=#0033CC
- name: Run R script to create html
run: |
source(".github/r_code/edit_html_improve_formatting.R")
writeLines(html_txt, "SS330_User_Manual.html")
shell: Rscript {0}
- name: upload html file as artifact
uses: actions/upload-artifact@v4
with:
name: SS330_User_Manual.html
path: SS330_User_Manual.html