-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.19 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
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@v3
- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.17.1'
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.0'
use-public-rspm: true
- uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
- name: Render html
run: Rscript -e "rmarkdown::render('index.Rmd')"
env:
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
- name: Render pdf
run: Rscript -e "pagedown::chrome_print(input = 'index.html', output = 'index.pdf', wait = 5)"
- 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