update generated artifacts #99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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","distill","rmarkdown"),,c("https://rforge.net","https://cloud.R-project.org"))' | |
- name: Render _web | |
run: | | |
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 |