-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 2.1 KB
/
build.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
name: Build and deploy
on:
push:
branches:
- master
schedule:
- cron: '0 5 1,15 * *'
jobs:
Build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: r-lib/actions/setup-pandoc@v1
with:
pandoc-version: '2.7.3'
- uses: r-lib/actions/setup-r@v1
with:
r-version: '3.6.0'
- name: Python 3.6
uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Install pandoc filters
run: |
python -m pip install --upgrade pip
pip install pandoc-fignos pandoc-eqnos pandoc-tablenos pandoc-secnos pandoc-xnos
which pandoc pandoc-fignos pandoc-eqnos pandoc-tablenos pandoc-secnos pandoc-xnos
- name: Install LaTeX
run: |
sudo apt-get install texlive-latex-base
sudo apt-get install texlive-fonts-recommended
sudo apt-get install texlive-fonts-extra
sudo apt-get install texlive-latex-extra
- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
sudo apt-get install libpoppler-cpp-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libglu1-mesa-dev
sudo apt-get install libmagick++-dev
- name: Install R dependencies
run: Rscript -e "install.packages(c('glue', 'tidyverse', 'readr', 'rmarkdown', 'pagedown', 'rorcid', 'rcrossref'))"
- name: Build html
run: Rscript -e "rmarkdown::render('index.Rmd')"
- name: Build pdf
run: Rscript -e "pagedown::chrome_print(input = 'index.html', output = 'index.pdf')"
- name: Prepare deployment
run: |
mkdir docs
mv index.html docs/index.html
mv index.pdf docs/BenMerSci.pdf
- name: Deploy gh_pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs
SINGLE_COMMIT: true