-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (41 loc) · 1.32 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
name: Build RJournal site to render-test
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Install dependencies
run: |
export MAKEFLAGS=-j4
sudo /bin/bash -c 'DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -q -y libcurl4-openssl-dev'
Rscript -e 'install.packages(c("rjtools","rmarkdown"),,c("https://rforge.net","https://cloud.R-project.org"))'
- name: Render _web
run: |
rm -rf _web/ && Rscript -e 'rmarkdown::render_site()'
- name: Free disk space on the runner
run: |
df -h .
sudo rm -rf /home/linuxbrew /usr/share/miniconda /usr/local/share /usr/local/lib/android
df -h .
- name: Checkout legacy content branch
uses: actions/checkout@v3
with:
ref: legacy-content
path: legacy
- name: Merge legacy into dev _web
run: |
rsync -a --remove-source-files legacy/ _web/
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_web
publish_branch: render-test